SPSSINC SPLIT DATASET

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

SPSSINC SPLIT DATASET

pgaudrea
Hi,

I am using SPSS 21. I have installed SPSSINC SPLIT DATASET in SPSS 21 along with Python.

The new bundle has been installed because it is now available under "Split into file".

However, using both the syntax or the built-in command, I am getting this error:

>Error # 1.  Command name: SPSSINC
>The first word in the line is not recognized as an SPSS Statistics command.
>Execution of this command stops.


Any help would be appreciated.

Patrick Gaudreau
Reply | Threaded
Open this post in threaded view
|

Re: SPSSINC SPLIT DATASET

Jon K Peck
That error message means that the command was not installed or the install failed.
- You need to restart Statistics after installing it
- If you did not do the install using Run As Administrator (on Win7), the installer probably did not have write permission to the necessary directories.

Run SHOWEXTPATH in Statistics.  This shows where extension commands can go.  Look in those directories for SPSSINC_SPLIT_DATASET.xml.  If it is not in any of the search directories, it indicates for sure that the command was not successfully installed.


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621




From:        pgaudrea <[hidden email]>
To:        [hidden email],
Date:        10/18/2013 08:31 PM
Subject:        [SPSSX-L] SPSSINC SPLIT DATASET
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Hi,

I am using SPSS 21. I have installed SPSSINC SPLIT DATASET in SPSS 21 along
with Python.

The new bundle has been installed because it is now available under "Split
into file".

However, using both the syntax or the built-in command, I am getting this
error:

>Error # 1.  Command name: SPSSINC
>The first word in the line is not recognized as an SPSS Statistics command.
>Execution of this command stops.


Any help would be appreciated.

Patrick Gaudreau



--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/SPSSINC-SPLIT-DATASET-tp5722632.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD


Reply | Threaded
Open this post in threaded view
|

Re: SPSSINC SPLIT DATASET

pgaudrea
Dear Jon,

Many thanks; it worked.

Would it be possible to incorporate something in the OPTION in order to create and save each of the new files in a different format: .dat (without variable names on top)?

Such an option would be handy to directly import the files in some SEM software.

Patrick
Reply | Threaded
Open this post in threaded view
|

Re: SPSSINC SPLIT DATASET

Jon K Peck
It would be hard to make an option such as you describe general and efficient.  The intended way to do something like that is to use the companion extension command SPSSINC PROCESS FILES for this.

PROCESS FILES iterates over a set of files.  It might be all the files in some directory or a wildcard specification or a list of files produced by SPLIT DATASET.
It takes a syntax file that will be applied in turn to each file.  PROCESS files defines macros and file handles for the inputs, so you would open each file using the file handle, do transformations, run procedures, write new files or whatever.

From the syntax help ...

The block of syntax specified in SYNTAX will be executed for each matching file.  
It should include the appropriate command to read the data file or other inputs.
File handles and macros are defined to refer to the input file and various output
locations.  

The file handles are as follows.
JOB_INPUTFILE: The input file
JOB_DATADIR: The input data directory
JOB_OUTPUTDATADIR: The specified output data directory or <NONE>
JOB_VIEWERDIR: The specified Viewer output directory or <NONE>

For a SAV file you could read the data with the command
GET FILE="JOB_INPUTFILE".
Macros are defined with these same names except starting with "!".  Two
additional macros are defined.
!JOB_DATAFILEROOT: The name of the input data file without its extension
!JOB_DATAFILEEXT: The extension of the input data file

Macro text is quoted.  Here is an example of code that might be used in the
syntax file to export output to the VIEWERDIR in Excel using the data file rootname.

define !out () !quote(!concat(!unquote(!eval(!job_viewerdir)), "/", !unquote(!eval(!job_datafileroot)), ".xls"))
!enddefine.
output export /xls DOCUMENTFILE =!out.

The text !JOB or JOB is replaced by the root name specified in MACRONAME.


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621