1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
***** Save this portion as a syntax file "SaveClose.SPS" *****. 
*Example of how to use a script to save output with a specified name. 
*Add the SCRIPT command at the end of each syntax file. 
*Can be used with a production job to save output to multiple files. 
*Requires SPSS 8.0. 
*Example syntax... please use your own syntax. 
GET FILE='C:\\Program Files\\SPSS\\Cars.sav'. 
DESCRIPTIVES 
	VARIABLES=mpg engine horse weight accel year origin cylinder filter_$ 
	/STATISTICS=MEAN STDDEV MIN MAX . 
EXECUTE . 
*This syntax executes the script and passes a filename as an argument. 
*The script opens a new output window, and saves the existing output. 
SCRIPT file="c:\\program files\\spss\\scripts\\SaveClose.sbs" 
	/("SaveClose.spo") . 
***** End of syntax example *****.