Environment testing

PEL lets you check several environment values to conditionally pass panel lines to ISPF. This feature provides the ability to custom tailor panels for different groups of users based on userid, logon procedure name, the allocation of a DDNAME, or for different programs.

))IF-<environment-keyword>=<environment-value>

Where:

<environment-keyword>
One of the environment variables.
<environment-value>
The value the environment variable is tested against.

The following table lists the supported environment fields:

Table 1. Environmental keyword context
Environment keyword Valid environment values Notes
APPL current applied From ZAPPILD
DD DD name to be tested True if DD allocated
GUI Y or N If running in GUI mode
HOTBAR Y or N Set by the user with the SET command (in MSL or PLIST).
LOGPGM Logon proc program name From PGM= on the logon JCL
MIGSYS name of migration system or N/A if none specified From DSC customization.
MIGVOL Migration system volser From DSC customization or ISRCONFG
OPER Y or N From PSCBCTRL
PANEL current panel Used in included members
PGM current program From SELECT PGM()
SECTION current panel section Used in included members
SRC.MGR S or N or Y If SCLM active for userid (as set by DSC customization), and S is true.
SYSID System ID From CVTSNAME
TSODEST Default destination From PDSCDEST
TSOUNIT Default allocation unit From PSCBGPNM
USERID Current userid

For example, assume that you want the system group (which uses the LOG$SYS logon procedure) to have access to a special system utilities menu. You could change the main menu )BODY section to have the following lines:

    ))IF-LOGONPROC=LOG$SYS
        %Y + - SYSTEM UTILITIES
    ))IF-END

Similarly, in the &ZSEL statement on the )PROC section:

    ))IF-LOGONPROC=LOG$SYS
        Y,'PANEL(SYSUTIL)'
    ))IF-END

As another example, assume that you include menu definition lines in an external member called MENUDEF1 that is included from both the main menu (ISR@PRIM) and the utilities menu (ISRUTIL). The following lines can be used in MENUDEF1 to change the description of the X command:

    ))IF-PANEL=ISR@PRIM
        %X  - TERMINATE ISPF USING LOG/LIST DEFAULTS
    ))ELSE
        %X  - RETURN TO PREVIOUS PANEL
    ))IF-END