Dynamic system symbols

This section describes the dynamic system symbols. The names of the following system symbols are changed from previous releases of MVS™:
New symbol Old symbol
&YYMMDD &DATE
&LYYMMDD &LDATE
&HHMMSS &TIME
&LHHMMSS &LTIME

To maintain compatibility, the original system symbols (Compatibility-only dynamic system symbols) are still supported by the DUMPDS command. However, IBM® suggests that you change to use the new system symbols (Dynamic system symbols) because the substitution texts for the old system symbols might cause buffer overflows.

The system determines the substitution text for dynamic system symbols when the ASASYMBM or ASASYMBF service is called to do the substitution. For example:
  • For system symbols within a parmlib member, when the parmlib member is processed.
  • For system symbols within JCL, when the JCL undergoes conversion.
  • When an application program is running.
See the following tables:
Table 1. Dynamic system symbols
System symbol Description
&DAY The day of the month, based on Coordinated Universal Time (UTC). Shown in two decimal digits, 01-31. Use &LDAY for local time.
&DS The dump section number for multiple data sets in a transaction dump (TDUMP). Shown in three decimal digits, 000-999. &DS is resolved when used by IEATDUMP.
&HHMMSS The time. Equivalent to &HR.&MIN.&SEC.. Use &LHHMMSS for local time.
&HR The hour of the day, based on UTC. Shown in two decimal digits, 00-23. Use &LHR for local time.
&JDAY The Julian day of the year, based on UTC. Shown in three decimal digits, 001-366. Use &LJDAY for local time.
&JOBNAME The name of the job. Shown in 1-8 characters. In the special case when the job name is *MASTER*, &JOBNAME resolves to #MASTER# to avoid the error of using the asterisk as part of a data set name.

Under z/OS®, it is valid to define a user ID that is all numeric. Under z/OS UNIX, this all-numeric user ID might be propagated as a job name in the case of a fork() or non-local spawn(); this can lead to allocation failures when &JOBNAME is used in substitution for a data set name.

If you specify the &JOBNAME dynamic system symbol in a START command for a started task, the resolved substitution text for &JOBNAME is the name of the job assigned to the address space that calls the symbolic substitution service, not the address space of the started task.

Within JCL, the substitution text for &JOBNAME is the name of the job assigned to the address space in which the JCL is converted, not the name of the job being processed. For instance, if JES2 does the conversion, &JOBNAME resolves to JES2.

&LDATE The local date, based on Coordinated Universal Time (UTC). Equivalent to &YR2.&MON.&DAY..
&LDAY The day of the month, based on local time. Shown in two decimal digits, 01-31.
Start of change&LHHMMSSEnd of change Start of changeThe local time. Equivalent to &LHR.&LMIN.&LSEC.End of change
&LHR The hour of the day, based on local time. Shown in two decimal digits, 00-23.
&LJDAY The Julian day of the year, based on local time. Shown in three decimal digits, 001-366.
&LMIN The minute of the hour, based on local time. Shown in two decimal digits, 00-59.
&LMON The month, based on local time. Shown in two decimal digits, 01-12.
&LSEC The second of the minute, based on local time. Shown in two decimal digits, 00-59.
&LTIME The local time that the dump was requested, Equivalent to &HR.&MIN.&SEC..
&LWDAY The day of the week, based on local time. Shown in three characters: SUN, MON, TUE, WED, THU, FRI or SAT.
&LYR2 The year, based on local time. Shown in two decimal digits, 00-99.
&LYR4 The year, based on local time. Shown in four decimal digits, 0000-9999.
&MIN The minute of the hour, based on UTC. Shown in two decimal digits, 00-59. Use &LMIN for local time.
&MON The month, based on UTC. Shown in two decimal digits, 01-12. Use &LMON for local time.
&SEC The second of the minute, based on UTC. Shown in two decimal digits, 00-59. Use &LSEC for local time.
&SEQ A sequence number for uniqueness. It is required for names of automatically allocated dump data sets. Shown in five decimal digits, 00000-99999. &SEQ is resolved only when used with DUMPDS.
&WDAY The day of the week, based on UTC. Shown in three characters: SUN, MON, TUE, WED, THU, FRI or SAT. Use &LWDAY for local time.
&YR2 The year, based on UTC. Shown in two decimal digits, 00-99. Use &LYR2 for local time.
&YR4 The year, based on UTC. Shown in four decimal digits, 0000-9999. Use &LYR4 for local time.
&YYMMDD The date, based on UTC. Equivalent to &YR2.&MON.&DAY.. Use &LYYMMDD for local time.
Table 2. Compatibility-only dynamic system symbols
System symbol Description
&DATE The date, based on Coordinated Universal Time (UTC). Equivalent to &YR2.&MON.&DAY.. Use &LDATE for local date.
&TIME The time that the dump was requested, Equivalent to &HR.&MIN.&SEC.. Use &LTIME for local time.
Note: You can specify dynamic system symbols in parmlib. However, be aware that the system substitutes text for dynamic system symbols when it processes parmlib members. For example, if you specify &HHMMSS in a parmlib member, its substitution text will reflect the time when the member is processed.