Dynamic system symbols

Table 1 describes the dynamic system symbols and the releases for which they are valid. 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 are still supported by the DUMPDS command. However, IBM® suggests that you change to use the new system symbols because the substitution texts for the old system symbols might cause buffer overflows.

Start of changeThe 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.
End of change
Table 1. 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.
&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.

Start of changeIf 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.End of change

&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.
&TIME The time that the dump was requested, Equivalent to &HR.&MIN.&SEC.. Use &LTIME for local time.
&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.
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.