IBM SPSS Collaboration and Deployment Services comment block
The IBM SPSS Collaboration and Deployment Services Comment Block defines script parameters for .dms and .mrs scripts.
Syntax for comment blocks
<PARAM_NAME> <TYPE> "<DEFAULT_VALUE>" "<DESCRIPTION>"
The IBM SPSS Collaboration and Deployment Services comment line is supposed to be a single line comment. If it is used in a comment block, it is ignored and regarded as a common comment line.
Parameters
<PARAM_NAME>
Parameter name. The name must conform to the mrScriptBasic naming conventions.
For more information, see
Naming conventions.
<TYPE>
Parameter type. The type must conform to supported mrScriptBasic data types.
For more information, see
Data types.
<DEFAULT_VALUE>
Parameter default value. Can be any string.
<DESCRIPTION>
Parameter description. Can be any string.
Notes
▪Comment lines that do not fully meet the IBM SPSS Collaboration and Deployment Services comment block rules are regarded as a normal comment lines and are ignored.
▪When .dms and .mrs scripts are run locally, the IBM SPSS Collaboration and Deployment Services comment line is treated as a normal comment line. IBM SPSS Collaboration and Deployment Services comment lines are only used when the .dms/.mrs script is stored to a IBM SPSS Collaboration and Deployment Services Repository.
Script parameters
.dms and .mrs scripts can define the following script parameters:
Input parameters
Comment lines that begin with ?? (double question marks) are regarded as input parameter lines. For example:
'?? SELECT_QUERY Text "SELECT * FROM HDATA.Person" "Select query string"
Additional input parameters (zero or more parameters) are also supported.
Output variables
Comment lines that begin with @@ (double at symbols) are regarded as output variable lines. The variable values are decided by the script logic. For example:
'@@ COMPLETION_CODE Long "0" "Job completion status code"
For .dms scripts, the output variable values can only be defined in OnJobEnd events. For example:
Event(OnJobEnd)
Dim COMPLETION_CODE
' Output parameters value decided by user logic
Set COMPLETION_CODE = 1000
End Event
For .mrs scripts, the output variable can be defined anywhere within the script. For example:
Dim COMPLETION_CODE
' Output parameters value decided by user logic
Set COMPLETION_CODE = 0
Notes
▪No variables or one output variable is supported.
▪If the output variable is defined, its name must be COMPLETION_CODE and the type must be Long.
▪If the COMPLETION_CODE value is not changed by user logic, its default value is zero.
▪If the script encounters an error, the job step is marked as failed and no output variables are available for use. If the script runs successfully, its values are controlled by script itself. For example, if the job includes bad cases, you can set the job’s value in the OnBadCase event section to an appropriate value.
▪Output files: Comment lines that begin with $$ (double dollar symbol) are regarded as output file lines. For example:
'$$ OUTPUT_METADATA MDD "\\share\person.mdd" "Output metadata file"
'$$ OUTPUT_CASEDATA DDF "\\share\person.ddf" "Output casedata file"
Additional output files (zero or more output files) are also supported.
See also