Copying Syntax from an Output File

When you need to make a minor modification to an existing command syntax file, one way to do this is to edit the output. By default, each command appears in the output immediately before its output (note that you can turn this feature off with the SET PRINTBACK OFF command).

To copy syntax from an output file:

  1. Use the Batch Facility to run the existing command syntax file and specify text output.
  2. Open the output file with a text editor.
  3. Delete the output and line numbers from the file.
  4. Modify the syntax as desired.
  5. Save the file with a new name.
Figure 1. Unedited output file
7  SET LIST='/home/users/development/mcnancy/warning.txt'.
31 Oct 00
>Warning # 802 on line 7 in column 5.  Text: LIST
>You have attempted to use a SET subcommand which is obsolete.
   8  GET
   9   FILE='Employee data.sav'.
  10  FREQUENCIES
  11    VARIABLES=gender
  12    /ORDER=  ANALYSIS .
  13  
  14  * End of INCLUDE nesting level 00.
Frequencies
Statistics
Gender 
|_|_______|___|
|N|Valid  |474|
| |_______|___|
| |Missing|0  |
|_|_______|___|
Gender
|____________|_________|_______|_____________|__________________|
|            |Frequency|Percent|Valid Percent|Cumulative Percent|
|_____|______|_________|_______|_____________|__________________|
|Valid|Female|216      |45.6   |45.6         |45.6              |
|     |______|_________|_______|_____________|__________________|
|     |Male  |258      |54.4   |54.4         |100.0             |
|     |______|_________|_______|_____________|__________________|
|     |Total |474      |100.0  |100.0        |                  |
|_____|______|_________|_______|_____________|__________________|

  15  
    14 command lines read.
     0 errors detected.
     1 warnings issued.
     1 seconds elapsed time.
       End of job.

In this example, we also removed the SET command because it had an invalid subcommand.

Figure 2. Edited output file ready to be used as syntax

GET
 FILE='Employee data.sav'.
FREQUENCIES
 VARIABLES=gender
 /ORDER=ANALYSIS.