52
15
Working with the IBM SPSS Statistics Batch Facility
where syntaxfile is replaced by the name of your command syntax file, outputtype is a valid output
type (
text
,
html
,
sav
,or
oxml
), and outputfile is replaced by name of the file where the output is
placed. If the file path contains spaces, the path must be enclosed in double quotes.
For example, the command:
statisticsb -f "C:\syntaxjobs\bank.sps" -type text -out C:\output\bank.txt
will run the command syntax file bank.sps and put text output into bank.txt.
One command syntax file name is allowed on the command line. Additional command line
parameters are described in this guide. For more information, see the topicCommandLine
Switchesonp. 17.
If you have a profile, the commands in the profile will be processed before the commands in
your command syntax file. For more information, see the topicUsinganAutomaticBatchFacility
Profileonp. 26.
Interrupting and Ending a Batch Job
Interrupt jobs that are taking much longer than expected. Use interrupt with caution—it terminates
The Batch Facility abnormally and it may leave extra files (for example, core) on your system.
The Batch Facility automatically exits after it processes the last command in the syntax file.
You don’t need to issue any finish commands.
E
Windows.UsetheTaskManagertoendthestatisticsb.exeprocess.
E
UNIX.FindtheprocessIDofthebatchjob(forexample,usetheps-efcommandattheUNIX
prompt) and then kill the process (for example, use
kill
pid at the UNIX prompt).
Running as a Detached Process
There are several ways that you can run the Batch Facility as a detached process. For example,
you can run the Batch Facility:
ɸ
As a background processon UNIX.Use&onthecommandlinetoruntheBatchFacilityasa
background process. With the Batch Facility running in the background, you can use your
terminal for other tasks.
For example, to run the Batch Facility in the background, use this
command at the prompt (it should be one line):
statisticsb -f /home/users/myhome/syntaxjobs/bank.sps -type text
-out /home/users/myhome/output/bank.txt &
ɸ
While you are logged off from UNIX.UsenohuponthecommandlinetoallowtheBatch
Facility to continue running when you are logged off of the terminal. This is useful for jobs
that take a long time. You can run them without leaving your terminal open. For example, to
run the Batch Facility while you are logged off, use this command at the UNIX prompt (it
should be one line):
nohup statisticsb -f /home/users/myhome/syntaxjobs/bank.sps -type text