IBM Support

Running SPSS Statistics syntax on any platform displays "Error # 34"

Question & Answer


Question

Below is the syntax being executed by IBM SPSS Statistics and the following is the error message: PRESERVE. SET PRINTBACK OFF MPRINT OFF. INSERT FILE= /Applications/IBM/SPSS/Statistics/23/dhps/DHPS.sps . RESTORE. PRESERVE. SET PRINTBACK OFF MPRINT OFF. >Error # 34 in column 13. Text: >SPSS Statistics cannot access a file with the given file specification. The >file specification is either syntactically invalid, specifies an invalid >drive, specifies a protected directory, specifies a protected file, or >specifies a non-sharable file. >Execution of this command stops. Adding a "c:\\" or "c:\" or changing the "\" to "/" did not resolve this problem. Attempting to move the .sps file to the Mac HD drive and just putting the file name in the syntax command did not resolve this problem. It seems that IBM SPSS Statistics cannot locate the file.

Cause

The syntax being used is incorrect.

Answer

The location of the data file must be enclosed in quotation marks. For example:

PRESERVE.
SET PRINTBACK OFF MPRINT OFF.
INSERT FILE='/Applications/IBM/SPSS/Statistics/23/dhps/DHPS.sps'.
RESTORE.

[{"Product":{"code":"SSLVMB","label":"IBM SPSS Statistics"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Statistics Desktop","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"Not Applicable","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 April 2020

UID

swg21883526