System variables


During execution of a JCL script, the script can access system variables to obtain information about the job, the user, the date, and the time.

Except for LASTCC, all system variables are prefixed with SYS. The following table lists system variables.

Variable

Description

&LASTCC

Return code set that was set by the execution of certain script statements

&SYSCOMMAND

Name of the JCL script that was invoked initially

&SYSDATE

Current date in the format CCYY-MM-DD

&SYSDLM

Literal /*

&SYSJDATE

Current Julian date in the format YYDDD

&SYSJOB

Current job name (of the CPC/ADV region)

&SYSJOBID

Current job number (of the CPC/ADV region), in format JOBnnnnn (or TSUnnnnn if run under TSO)

&SYSJSDAT

Job start date (of the CPC/ADV region), in the format YYDDD

&SYSNDATE

Current date in the format DDMMYY

&SYSNSDAT

Job start date (of the CPC/ADV region) in the format DDMMYY

&SYSPROC

Current procedure (PROC) step name (of the CPC/ADV region)

&SYSRC

Highest return code set by a MSG statement so far

&SYSS#

Two-digit statement number assigned to the next statement in the sequence of statements that have been processed since the last job statement was processed

&SYSSCRIPT

Name of the JCL script that is being executed

&SYSSTEP

Current job step name (of the CPC/ADV region)

&SYSSTIME

Current job start time (of the CPC/ADV region) in the format HHMMSS

&SYSTEMID

Operating system identifier

&SYSTIME

Current time in the format HHMMSS

&SYSTRACE

Current setting for the TRACE statement (ENABLED or DISABLED)

&SYSUID

Current job user ID or logon ID (of the CPC/ADV region)

&SYSUSER

Current job user ID or IMS Advisor logon ID

Related topic



 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*