v Local encoding. The production job runs in the current localeencoding.Unless a different encodingis
explicitly specifiedon a command thatreads text data (for example, GET DATA), text data files are read
in the current locale encoding. Syntax file with a Unicode UTF-8 byte order mark are readas Unicode
UTF-8.All othersyntax files are readin the current locale encoding.
Production jobs use command syntax files totell IBM SPSS Statistics what to do.Acommand syntax file
is a simple text file containing command syntax. You can usethe syntax editor or any text editor tocreate
the file. You can also generate commandsyntax by pasting dialog box selections intoa syntax window.
See the topic Chapter14, “Working with Command Syntax,” on page 165 for more information.
If you include multiple command syntax files, the files are concatenated together in the orderthey appear
in the list and run as a singlejob.
Syntax format. Controls the form of the syntax rules usedfor thejob.
v Interactive.Each command must end with a period. Periods can appear anywhere within the
command, andcommands can continue on multiple lines, but a period as the last nonblank character
on a line is interpretedas the endof thecommand.Continuation lines and new commands can start
anywhere on a new line. These are the "interactive" rules in effect when you selectandrun commands
in a syntax window.
v Batch.Each command must start at the beginning of a new line (no blankspaces before the start of
the command),andcontinuation lines must be indented atleast one space. If you want to indent new
commands, you can use a plus sign, dash,orperiod as thefirstcharacter at the start of the line and
then indenttheactual command. The periodat theendof the command is optional.This settingis
compatible with thesyntax rules forcommand files included with theINCLUDE command.
Note: Do not usetheBatch option if your syntax files contain GGRAPH commandsyntax that includes GPL
statements. GPL statements will only run underinteractive rules.
ErrorProcessing. Controls the treatmentoferror conditions in the job.
v Continue processingafter errors. Errors in the job do not automatically stop commandprocessing.
The commands in the production job files aretreated as partof thenormal command stream,and
command processing continues in thenormal fashion.
v Stopprocessing immediately. Commandprocessingstops when the first error in a production job file
is encountered. This is compatible with the behavior of commandfiles includedwith the INCLUDE
These options control the name, location, and format of the production job results. Thefollowing format
options are available:
v Viewer file (.spv). Results are saved in IBM SPSS Statistics Viewer format in the specified file location.
You can storetodisk or to an IBM SPSS Collaboration and Deployment Services Repository. Storing to
an IBM SPSS Collaboration andDeployment Services Repository requires the Statistics Adapter.
v WebReports (.spw). Results are stored to an IBM SPSS Collaboration and Deployment Services
Repository. This requires the StatisticsAdapter.
v Word/RTF. Pivot tables are exportedas Word tables with all formatting attributes intact (for example,
cell borders,font styles, and background colors).Textoutput is exported as formattedRTF. Charts, tree
diagrams,andmodel views areincluded in PNG format. Note that Microsoft Word mightnot display
extremely wide tables properly.
v Excel. Pivot table rows, columns, and cells areexportedas Excel rows, columns, andcells, with all
formatting attributes intact (forexample, cell borders,fontstyles,andbackground colors). Text output
is exportedwith all font attributes intact. Each line in the textoutput is a row in theExcel file,with the
entirecontents of the linein a single cell. Charts,tree diagrams, and model views are included in PNG
format. Output can be exportedas Excel 97-2004 or Excel 2007 and higher.
v HTML.Pivot tables are exported as HTML tables. Textoutput is exported as preformatted HTML.
Charts, tree diagrams, and model views are embedded in the document in the selectedgraphic format.
Abrowser compatiblewith HTML5 is required for viewing output that is exportedin HTMLformat.
v Web Report.Aweb reportis an interactive document that is compatible with most browsers.Many of
the interactive features of pivot tables availablein theViewer are also available in web reports. You can
also export a web report as an IBM CognosActive Report.
v Portable Document Format. All output is exportedas itappears in Print Preview, with all formatting
v PowerPoint file. Pivottables are exported as Wordtables and areembeddedon separate slides in the
PowerPoint file, with oneslide for each pivot table. All formatting attributes of the pivot table are
retained(for example, cell borders, font styles, and backgroundcolors). Charts,tree diagrams, and
model views areexportedin TIFF format. Text output is not included.
ExporttoPowerPoint is availableonly on Windows operating systems.
v Text. Text outputformats include plain text, UTF-8,andUTF-16. Pivottables can be exported in
tab-separated or space-separated format. All textoutput is exported in space-separated format. For
charts,tree diagrams, and model views, a lineis inserted in the text file foreach graphic, indicating the
image file name.
Print Viewer file on completion. Sends the final Viewer output file to the printer on completion ofthe
production job.This option is not available when runninga production job in the background on a
Table Options. Notable options are available for HTMLformat.All pivot tables are convertedtoHTML
Image Options. The available image types are: EPS,JPEG, TIFF, PNG, and BMP. On Windows operating
systems,EMF (enhancedmetafile) format is also available.You can also scale the imagesizefrom 1%to
Table Options. You can usethe Vieweroutlineentries as slidetitles. Each slide contains a single output
item. The title is formedfrom the outline entry for the item in the outlinepane of the Viewer.
Image Options. You can scale the image sizefrom 1% to 200%. (All images are exportedto PowerPoint in
Note:PowerPoint format is only available on Windows operating systems and requires PowerPoint 97 or
Embedbookmarks. This option includes bookmarks in the PDF document that correspondtothe Viewer
outline entries. Like the Vieweroutlinepane, bookmarks can make it much easier to navigate documents
with a large number of output objects.
Embedfonts. Embedding fonts ensures that the PDF document will look the same on all computers.
Otherwise, ifsome fonts usedin the document are notavailable on the computerbeing usedto view (or
print) the PDF document, fontsubstitution mayyield suboptimal results.
Table Options. Pivot tables can be exported in tab-separatedorspace-separatedformat. For
space-separated format, you can also control:
v ColumnWidth. Autofit does not wrap any column contents, and each column is as wide as the widest
label or value in that column.Custom sets a maximum column width that is appliedto all columns in
the table,andvalues thatexceed thatwidth wrap ontothenext linein that column.
v Row/ColumnBorder Character.Controls thecharacters usedto create row and column borders. To
suppress display of row and column borders, enter blank spaces for thevalues.
Image Options. The available image types are: EPS, JPEG, TIFF, PNG, and BMP. On Windows operating
systems,EMF (enhancedmetafile) format is also available.You can also scale the imagesizefrom 1%to
Production jobs with OUTPUT commands
Production jobs honor OUTPUT commands, such as OUTPUT SAVE, OUTPUT ACTIVATE, and OUTPUT NEW. OUTPUT
SAVE commands executed during the course of a production job will writethe contents of the specified
output documents to the specified locations. This is in addition tothe output file created by the
production job. When using OUTPUT NEW to create a new outputdocument, it is recommended that you
explicitly save it with the OUTPUT SAVE command.
Aproduction job outputfileconsists of the contents of the active output document as of the end of the
job.For jobs containingOUTPUT commands,the output file may not contain all output created in the
session. For example, suppose the production job consists of a number of procedures followed by an
OUTPUT NEW command, followedby more procedures but no more OUTPUT commands. The OUTPUT NEW
commanddefines a new active output document.At theendof the production job, it will contain output
from only the procedures executed after the OUTPUT NEW command.
Runtime values definedin a production jobfileandused in a command syntax file simplify tasks such as
running the same analysis for different data files or running the sameset of commands for different sets
of variables. Forexample, you could define the runtime value@datafile to prompt you fora data file
name each time you run a production jobthat uses the string@datafile in place ofa filenamein the
v Runtime valuesubstitution uses themacrofacility (DEFINE-!ENDDEFINE) to create string substitution
v Runtime values in command syntax files are ignoredif they are enclosedin quotation marks.If the
runtime value needs tobe quoted, select Quote Value. If the runtimevalue is only part of a quoted
string, you can includethe runtime value in a macro with the!UNQUOTE and !EVAL parameters.
Symbol. The string in the command syntax file thattriggers the production jobtoprompt the user for a
value. The symbol namemust begin with an @ sign andmust conform to variable naming rules. See the
topic “Variable names” on page 50 for more information.
Default Value.The value thatthe production jobsupplies bydefault ifyou don't enter a different value.
This value is displayed when the production jobprompts you forinformation. You can replace or modify
the value at runtime. If you don't provide a default value, don't usethe silent keyword when running
the production job with command line switches, unless you alsouse the -symbol switch to specify
runtimevalues.Seethetopic “Running production jobs from a command line” on page 240 for more
UserPrompt. The descriptive label that is displayedwhen theproduction jobprompts you to enter
information. For example, you coulduse the phrase "Whatdata filedoyou want to use?" to identify a
field thatrequires a data filename.
Quote Value.Encloses the default valueorthe value entered by the user in quotes. For example, file
specifications should be enclosed in quotes.
Command syntax file with user prompt symbols
GET FILE @datafile. /*check the Quote value option to quote file specifications.
FREQUENCIES VARIABLES=@varlist. /*do not check the Quote value option
Using a macro to replace part of a string value
If the entire replacement string is enclosedin quotes, you can use theQuote Value option. If the
replacement string is only part of a quoted string, you can include the runtime valuein a macro, using
the !UNQUOTE and!EVAL functions.
VARIABLE LABELS Var1
!QUOTE(!concat(!UNQUOTE(’First part of label - ’), !UNQUOTE(!EVAL(@replace)), !UNQUOTE(’ - rest of label’))).
You can run production jobs in two different ways:
Interactively. The program runs unattended in a separate session on either your local computer or a
remoteserver.Your local computermustremain on (andconnectedtothe remote server, if applicable)
until the job is complete.
In thebackground on a server.The program runs in a separate session on a remote server.Your local
computer does not havetoremain on and does nothave to remain connectedto the remote server.You
can disconnect and retrievethe results later.
Note: Runninga production job on a remote server requires access toa serverthat is running IBM SPSS
Statistics server. If you select torun the production job in the background on a remote server, you must
specify the server on which itwill run. Click Select Servertospecifytheserver. This applies only to jobs
run in the backgroundon a remoteserver, notjobs run interactivelyon a remote server.
Use theServer login dialog to addandmodifyremote servers andtoselectthe server to use to run the
current production job.Remote servers usually require a user ID and password, and a domain name may
also be necessary. Contact your system administratorfor information aboutavailable servers,a userID
and password, domain names, and other connection information.
If your site is running IBM SPSS Collaboration andDeploymentServices 3.5 or later, you can click
Search... to view a listof servers that are available on your network. If you are not logged on toa IBM
SPSS Collaboration andDeployment Services Repository, you will be prompted to enterconnection
information before you can view the list of servers.
Adding and Editing Server Login Settings
Use theServer Login Settings dialog box to add oredit connection information for remote servers for use
in distributed analysis mode.
Contact yoursystem administrator fora list of available servers, port numbers for the servers, and
additional connection information. Donot usetheSecureSocket Layerunless instructedto do sobyyour
ServerName.Aserver"name" can be an alphanumeric name that is assignedtoa computer (for
example,NetworkServer) or a unique IP address that is assigned to a computer(for example,
PortNumber.The portnumberis the portthat the server software uses forcommunications.
Description. You can enter an optional description to display in the servers list.
Connect with Secure Socket Layer. Secure Socket Layer(SSL) encrypts requests fordistributedanalysis
when theyare sentto theremote server. Before you use SSL, checkwith your administrator. For this
option to be enabled, SSLmustbe configuredon your desktop computer and the server.
Aproduction job prompts you for values wheneveryou run a production job that contains defined
runtimesymbols. You can replace or modify the default values that aredisplayed.Those values are then
substitutedfor the runtime symbols in all commandsyntax files associated with the production job.
Background job status
The background job status tab displays thestatus of production jobs that have been submitted to run in
the background on a remote server.
Servername.Displays the name of the currentlyselected remoteserver. Onlyjobs submitted to that
server are displayed in the list. To display jobs submitted to a different server, click Select Server.
Job status information. Includes production job name, current job status,andstart and end time.
Refresh. Updates the job status information.
Getjob output. Retrieves the output from theselected production job. The outputfor each job resides on
the server thejob was run on; so you must switch tothe status for that server to select the job and
retrievethe output. This button is disabled ifthejobstatus is Running.
Cancel job.Cancels the selected production job. This button is only enabledif the job status is Running.
Remove job.Removes the selected production job. This removes the job from the list and removes the
associated files from the remote server. This button is disabled if the jobstatus is Running.
Note:Background job status does notreflect the status of anyjobs run interactivelyon a remote server.
Running production jobs from a command line
Command line switches enable you toschedule production jobs to run automatically atcertain times,
using scheduling utilities available on your operating system. The basic form of the commandline
stats filename.spj -production
Depending on how you invoke the production job, you may need to include directory paths for the stats
executablefile(located in the directory in which theapplication is installed) and/or the production job
You can run production jobs from a command line with the following switches:
-production [prompt|silent]. Start the application in production mode.The prompt andsilent keywords
specify whethertodisplay the dialog box that prompts for runtime values if they are specified in the job.
Thepromptkeywordis the defaultandshows the dialog box. The silent keyword suppresses the dialog
box. Ifyou use the silent keyword, you can define the runtimesymbols with the -symbol switch.
Otherwise, the default value is used. The -switchserver and-singleseat switches are ignoredwhen
using the -production switch.
-symbol <values>. List of symbol-value pairs usedin the production job. Each symbol name starts with
@.Values thatcontain spaces should be enclosed in quotes. Rules forincludingquotes or apostrophes in
stringliterals may vary across operating systems, but enclosing a string thatincludes single quotes or
apostrophes in double quotes usually works (for example, “’a quoted value’”). The symbols must be
definedin the production jobusingtheRuntime Values tab. Seethe topic “Runtime values” on page 238
for more information.
-background. Run the production job in the background on a remote server. Your local computerdoes
not have toremain on and does not have to remain connected to the remoteserver.You can disconnect
and retrieve the results later. You must also include the -production switch and specify the server using
the -server switch.
Torun production jobs on a remote server, you also need to specify the server login information:
-server <inet:hostname:port> or -server<ssl:hostname:port>. The name or IP address and port number
of the server. Windows only.
-user <name>.Avalid username. If a domain name is required, precedetheuser name with thedomain
name and a backslash (\). Windows only.
-password <password>.The user's password.
stats \production_jobs\prodjob1.spj -production silent -symbol @datafile /data/July_data.sav
v This exampleassumes that you are running the commandlinefrom the installation directory,so no
path is required forthe stats executablefile.
v This examplealso assumes that the production job specifies that the value for @datafile should be
quoted(QuoteValue checkbox on the Runtime Values tab), sono quotes are necessary when specifying
the data file on the commandline. Otherwise, you would need to specify something like
"’/data/July_data.sav’" to include quotes with the data file specification, since file specifications
v The directory path forthe location of the production job uses the Windows back slash convention. On
Macintosh andLinux, use forwardslashes. Theforward slashes in the quoted data file specification
will work on all operatingsystems since this quoted string is insertedinto the commandsyntax file
andforward slashes are acceptable in commands that include file specifications (forexample, GET FILE,
GET DATA, SAVE) on all operating systems.
v The silent keywordsuppresses any user prompts in theproduction job, and the -symbol switch
inserts thequoteddata file nameandlocation wherever the runtime symbol @datafile appears in the
command syntax files included in the production job.
Converting Production Facility files
Production Facility job files (.spp) created in releases priorto16.0 will not run in release 16.0 or later. For
Windows andMacintosh Production Facilityjob files createdin earlier releases, you can use prodconvert,
located in the installation directory, to convert thosefiles to new production job files (.spj). Run
prodconvert from a commandwindow using the following specifications:
where [installpath] is the location of the folder in which IBM SPSS Statistics is installedand[filepath] is the
folder tthe original production job file is located.Anew file with thesame name butwith the extension
.spj is createdin the same folder as theoriginal file. (Note:If thepath contains spaces, enclose each path
and file specification in double quotes.On Macintosh operating systems, use forward slashes instead of
v WMF and EMFchart formats are not supported. PNGformatis used in place of these formats.
v The exportoptions Output Document (No Charts), Charts Only,andNothing are not supported.All
output objects supportedby the selected format are included.
v Remote serversettings are ignored.To specify remoteserversettings fordistributedanalysis,you need
torun theproduction job from a commandline, using command line switches to specify the server
settings.Seethetopic “Running production jobs from a command line” on page 240 for more
v Publish toWebsettings are ignored.
Documents you may be interested
Documents you may be interested