z/OS Batch Runtime Planning and User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


xJCL substitution-props

z/OS Batch Runtime Planning and User's Guide
SA23-1376-00

The job xJCL can contain symbolic variables. A symbolic variable is an expression of the form ${variable-name}, which is found outside a comment in an otherwise well-formed document. For example:

<checkpoint-algorithm-ref name="${checkpoint}" />

The xJCL element, substitution-props, defines a default name and value pairs for symbolic variables. Following is an example of the substitution-props element, taken from the postingSampleXJCL.xml document:

<substitution-props>
<prop name="wsbatch.count" value="5" /> 
<prop name="checkpoint" value="timebased" />
<prop name="checkpointInterval" value="15" />
<prop name="postingsDataStream" 
   value="${was.install.root}${file.separator}temp${file.separator}postings" />
</substitution-props>

Substitution for symbolic variables occurs at run time. At run time, the string ${variable-name} is replaced with the value of the property when the xJCL is submitted for execution. Using the properties in the previous example, the string ${checkpoint} is replaced with the string timebased before the job is submitted.

Symbolic variables can be indirect. For example: name=FILENAME value=${${filename}} used with the name/value pair filename=postingsDataStream yields the same result as specifying name=FILENAME value=${postingsDataStream}.

Symbolic variables can also be compound. For example:
name=postingsDataStream 
  value=${was.install.root}${file.separator}temp${file.separator}postings.
The name/value pairs must be defined in the job document substitution-props element. The props name and value pairs are initially defined to the default values for the named variables. The following two conditions must be met before an xJCL is considered valid:.
  • Every symbolic variable defined in the body of a job document must be resolved.
  • Every name/value pair defined in the job document must resolve to a symbolic variable which is found in the body of the xJCL.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014