Know the rules for using system symbols

The system enforces the following rules when you use system symbols in system commands. They apply in addition to the general rules for system symbols that are described in z/OS MVS Initialization and Tuning Reference.
  1. Substitution in a command begins after the command name. This means that you cannot use symbolic variables to resolve to a command prefix or to a command name. The command “&Asyspref &mycmd” would result in an error message, for example.
  2. If the issuing console has command association (CMDSYS) to another system, the issuing system first transports the command to the associated system. Substitution of any symbolic variables takes place on the receiving system.
  3. If a command has a prefix defined with the command prefix facility (CPF), the issuing system first transports the command to the system defined for that prefix. Substitution of any symbolic variables takes place on the receiving system.
  4. After echoing and logging a command, the system examines the command name. Certain commands receive special treatment:
    • The system will not perform substitution for symbolics in a VARY CN(*),ACTIVATE command.
    • A DUMPDS command will not undergo substitution. The DUMPDS command processor handles its own substitutions, at the time when it actually takes a dump.
    • For security reasons, the LOGON command does not support symbolic substitution.
    • For a REPLY command, substitution of any symbolic variables in the reply text takes place on the system originally issuing the WTOR.

      However, if the WTOR is synchronous (SYNCH = YES was specified, and the synchronous WTO/R service displays the WTOR), the system does not perform substitution of the reply text.

      But, if the system issues the WTOR early during the initial program load (IPL), that is, while the nucleus initialization program (NIP) is still in use:
      • The system performs substitution after it processes the requested symbolics it reads from the parmlib. This means that the system will substitute symbolic variables in replies to WTORs it issues after issuing the IEA347A SPECIFY MASTER CATALOG PARAMETER message.
      • The system will not issue message IEE295I for NIP-time replies that are changed by symbolic substitution. Message IEE600I will reflect the changed text.
    • For a ROUTE command, the system issuing the command performs the substitutions up through the specification of the destination system(s). Each destination system completes the substitution of the text for the command.
      For example, if you code the command
      RO  T=&T1,&SYSGRP1,F JOB&SYSCLONE,parms
      the system issuing that ROUTE command will substitute the variables
      &T1 and &SYSGRP1
      and each system in the system group that &SYSGRP1 names will issue the command
      F JOB&SYSCLONE,parms
      and each of those receiving systems will substitute its own value for &SYSCLONE. See “Using System Symbols in ROUTE Commands.”
    • You cannot use symbolic variables on an “L=” operand to aggregate the command response when sending a command to more than one system. The system will not substitute for the “L=” operand.
    • For commands other than REPLY and ROUTE, the system issuing the command performs the substitution for the text after the command name, including comments.
  5. You cannot use system symbols in commands that control batch jobs. Consider converting batch jobs to started tasks, which can specify system symbols.
  6. If substitution results in changing any command text, the system logs the “new” text again and issues message IEE295I.

    The system makes the original (pre-substitution) command text available to the command installation exits and the subsystem interface (SSI). However, current programs, if not modified, will see the substituted text.

    When the system calls the command installation exits or SSI, if those exits make any change to the command text, the system logs them again and issues message IEE295I. However, it does not perform substitution again. It frees the original command text, which means that it is no longer available in the system.