Intrinsic Variables

You can use the following intrinsic symbolic variables in a Process statement to substitute user-defined values when the Process is executed. This flexibility lets you use the same Process for multiple applications when these values change.

Value Description
%DD2DSN Specifies an allocated DD statement, which references a DSN to be passed to a Process being submitted.

The format is %DD2DSN(ddname), where ddname refers to an allocated DD in the address space of the JCL submitting the Process. The DSN, including the member if specified, is substituted for this variable. The ddname may contain 1-8 characters.

%JDATE Specifies the date the Process was submitted in Julian format. The variable is resolved as the submission date of the Process in the format yyyyddd. Among other uses, the value returned is suitable for constructing a file name on the node receiving the file.

The value of the variable is resolved at Process submit time. The value will correspond to the date on which the Process was submitted, regardless of when or how many times the Process is actually executed.

%JOBID Specifies the job number.
%JOBNM Specifies the job name.
%JUSER Specifies a variable that resolves to the USERID of the submitted job.
%MAXRC

Highest return code (CCOD) of all Process steps. Use to test the highest RC with the Modal logic.

%MSGID The message of the previous step. Use to test for a specific message id produced by the previous step.
%NUM1 Specifies the submission time of the Process in minutes, seconds, and fraction of seconds in the format mmssth.
%NUM2 Specifies the submitted time of a Process as the low order 4 bits of the milliseconds of the time expressed as 1 hex digit (a value from 0 through 15 expressed as 0 through F).
%PNODE Specifies the PNODE name where the submit occurs.
%PRAND Use this parameter to generate a pseudo-random number (6 hex digits) that can be used to construct a unique data set name.
%SUBDATE Specifies the date the Process was submitted in Gregorian format. The variable is resolved as the submission date of the Process in the format cyymmdd where c is the century indicator and is set to 0 for year 19yy or 1 for year 20yy.

The value returned can be used to create a file name on the node receiving the file.

%SUBDATE1 Use this parameter to substitute the submitted date in the yyyymmdd date format.
%SUBDATE2 Use this parameter to substitute the submitted date in the yyyyddmm date format.
%SUBDATE3 Use this parameter to substitute the submitted date in the mmddyyyy date format.
%SUBDATE4 Use this parameter to substitute the submitted date in the ddmmyyyy date format.
%SUBTIME Specifies the time the process was submitted. The variable is resolved as the submission time of the process in the format hhmmss. The return value can be used to create a file name on the node receiving the file.

The value of the variable is resolved at Process submit time. The value will correspond to the time at which the Process was submitted, regardless of when or how many times the Process is actually executed

%USER Specifies a variable that resolves to the user submitting the Process.