Difficulty interpreting spss code which converts data from text.

#1
Hi all,

I'm currently having some difficulties interpreting how a script I was given works. The code can be found at:

http://www-users.york.ac.uk/~rws500/syntax for creating sleep stage list OVERNIGHT.SPS

and the user is supposed to specify which sleep stages they wish to analyse to run analysis and the spss code then extracts and does some sort of conversion. The script is supposed to take this data

http://www-users.york.ac.uk/~rws500/phonosleep msc-Events_pt12.txt.

However I ran it on this data and the output file was empty (Epochs_12.txt). These are the instructions I was given for the script.

STEP 2: Use SPSS to Get a List of the Epochs That You Need to Analyze (currently this automated script is only for Embla files, but I will make one for the Grass system also)
a) For most applications, you will want to analyze only epochs of a certain sleep stage (or stages). In this step, you will create a text file list of the beginning second of each epoch that you want to analyze.
b) For this, use the SPSS file “syntax for creating sleep stage list.SPS”
1. From the previous step, have your staging file with header information deleted ready
2. Open this SPSS syntax file in SPSS
3. Near the beginning of this syntax, replace the file path information with the path for the staging file you want to use
4. Near the end of this syntax, indicate which sleep stage(s) you want to select, by changing the following line to the appropriate value:
SELECT IF(numstage=2)

Sleep stages are coded as follows:
('Wake'=0) ('S1'=1) ('S2'=2) ('S3'=3) ('S4'=4) ('REM'=5) ('MT'=6)

5. At the very end of the file, specify the path where you want the list to save to.
6. Run the script, and your original staging file will be converted to a list of epochs of the selected stage, saved in the specified location.
See the file “stagelistexport.txt” for an example of how this list of epochs should look – it is just a plain text list of the starting second of each epoch you want.
There is no "stagelistexport.txt" so I can't figure out what the end result is :p.
Any help is greatly appriciated, thanks for your time.