Overview
EASY/Exit provides a centrally controlled, rule-based mechanism to customize TSO logon and logoff processing via the TSO Logon/Logoff exits. Rules let administrators validate or override fields (for example, userid, password, account, procedure name), set display attributes, supply JCL, and automate actions without writing assembler exit code. To apply rule changes at runtime, refresh the in-storage rules and/or reload modules as described below.
Link-editing and loading exit modules
The TSO exits are implemented by load modules such as IKJEFLD1, IKJEFLD2, IKJEFLD3, IKJEFLN1, and IKJEFLN2. EASY/Exit provides a stub module (EXTEXLDX) that you link-edit to produce the required entry point names and then place in LPA or a linklist so TSO and EASY/Exit can access them.
//LINK EXEC PGM=IEWL,REGION=4M,PARM='XREF,LIST,LET,TEST,RENT'
//SYSPRINT DD SYSOUT=*
//SYSLMOD DD DISP=SHR,DSN=LOAD.LIBRARY.FOR.LPA
//SYSLIB DD DISP=SHR,DSN=DIF.LOAD.LIBRARY
//SYSLIN DD *
INCLUDE SYSLIB(EXTEXLDX) NAME IKJEFLD1(R)
INCLUDE SYSLIB(EXTEXLDX) NAME IKJEFLD2(R)
INCLUDE SYSLIB(EXTEXLDX) NAME IKJEFLD3(R)
INCLUDE SYSLIB(EXTEXLDX) NAME IKJEFLN1(R)
INCLUDE SYSLIB(EXTEXLDX) NAME IKJEFLN2(R)
To add a module dynamically to LPA:
SETPROG LPA,ADD,MODNAME=IKJEFLD1,DSNAME=load.library.for.LPA
To add a library into a new linklist and activate it:
SETPROG LNKLST,DEFINE,NAME=NEWLST,COPYFROM=CURRENT
SETPROG LNKLST,ADD,NAME=NEWLST,DSNAME=dif.load.library
SETPROG LNKLST,ACTIVATE,NAME=NEWLST
Use DISPLAY PROG,LPA,MODNAME=<modname> and DISPLAY MPF to confirm module and MPF exit status.
TSO environments handled by EASY/Exit
EASY/Exit provides rule processing at multiple TSO exit entry points. Enable an environment by including DEFENV <env> MODE(ACTIVE) in the rules. The primary environments are:
-
IKJEFLD1 — Logon Pre-Prompt environment (immediately after
LOGONis issued). - IKJEFLN1 — Logon Pre-Display environment (before the fullscreen logon panel is shown).
- IKJEFLN2 — Logon Post-Display environment (after the fullscreen logon panel is shown and Enter pressed).
- IKJEFLD3 — Logon Post-Prompt environment (after prior logon environments; examine/alter JCL or terminate logon).
- IKJEFLD2 — Logoff environment (when LOGOFF issued or LOGON in an active session to re-logon).
- IKJEFF10 — TSO SUBMIT command environment (validate/modify submitted JCL).
Each environment exposes environment-specific variables in addition to the global TSO variables described below.
Global TSO variables (Table 6-1)
The following variables are available in all EASY/Exit TSO environments. Many are writable; some are read-only. Administrators use these variables to control behavior such as suppression, failure, or issuing messages.
| Name | Values | Description |
|---|---|---|
| ENV | IKJEFLD1 | IKJEFLD2 | IKJEFLD3 | IKJEFLN1 | IKJEFLN2 | Indicates the TSO environment being processed. |
| USERID | 1-8 chars | TSO userid being processed; may be '*LOGON*' if not yet determined. |
| JCLFAIL | YES or NO | Set to YES to force logon or submit failure. |
| TSOXRSN | 1-4 digits | Reason code included in termination messages when JCLFAIL=YES. |
| TSOCMD | 1-256 chars | The TSO command issued (typically LOGON or LOGOFF). |
IKJEFLD1 — Logon Pre-Prompt
The IKJEFLD1 environment is entered immediately after the LOGON command and before prompting. Use this environment to validate or supply logon parameters (userid, password, account, procedure name, region size, etc.), to modify the logon command (&TSOCMD), or to set control flags.
| Name | Values | Description |
|---|---|---|
| LOGONFLAG0 | bitmask | Control bits (examples: NOPROMPT, ENQFAILD, DISCONNECT). Set NOPROMPT when suppressing the fullscreen logon panel; if set, supply mandatory variables such as &LOGONUSER, &LOGONPASS, and &LOGONPROC. |
| LOGONUSER | 1-8 char | TSO userid to use at logon. |
| LOGONPASS | 1-8 char | Password to use at logon. |
| LOGONPROC | 1-8 char | Catalogued procedure name for logon JCL. |
| LOGONREGN | 1-8 digits | Region size (KB). |
| JCL1 - JCL10 | 1-80 char each | JCL statements to replace default JOB/EXEC built by the logon processor. |
Notes: If EASY/Exit rules set variables that require NOPROMPT, ensure all required fields are supplied (either via variables or directly in &TSOCMD).
IKJEFLN1 — Logon Pre-Display
Entered after IKJEFLD1 and before the fullscreen logon panel is displayed. Use IKJEFLN1 to adjust the display messages and control reprompt behavior. Read-only variables include LOGONPNLLANG (panel language) and flags indicating source of stored logon data.
| Name | Values | Description |
|---|---|---|
| LOGONPNLLANG | 1-3 char | Panel language identifier (read-only). |
| LOGONREPROMPT | 1-2 digits | Reprompt code indicating which field to highlight on redisplay. |
| LOGONDMSG1 / LOGONDMSG2 | 1-80 char | Text displayed in fullscreen panel message areas. |
IKJEFLN2 — Logon Post-Display
Entered after user input (Enter pressed) on the fullscreen logon panel. Use IKJEFLN2 to validate user-supplied values, override values, or request a reprompt by setting &LOGONREPROMPT. If LOGONFLAG0 = NOPROMPT was set previously, IKJEFLN2 is not entered.
| Name | Values | Description |
|---|---|---|
| LOGONREPROMPT | 0–14 | Reprompt code (0 initial, nonzero to force redisplay highlighting a specific field). |
| LDISP_RACF / LDISP_DBCS / LDISP_NOPROMPT | YES or NO | Flags controlling source of logon information, display characteristics, and prompting. |
IKJEFLD3 — Logon Post-Prompt
Entered after prior logon environments have run and before logon completes. Use IKJEFLD3 to examine or modify the logon JCL, fail the logon, or collect statistics. Logon variables such as userid and password are not changeable here, but JCL statements (JCL1–JCL50) are available to be modified.
| Name | Values | Description |
|---|---|---|
| JCL1 - JCL50 | 1-80 char each | Logon procedure JCL statements (modify as needed). |
| TSOSHCLASS / TSOSCLASS / TSOSMCLASS | 1 char | Submit hold/class/message class values. |
| TSOSODEST | 1-8 char | Default SYSOUT destination. |
IKJEFLD2 — Logoff environment
Entered when a user logs off, or issues LOGON during an active TSO session to re-logon. Use IKJEFLD2 to gather statistics, write SMF records, start tasks, or prevent re-logon. The usual TSO variables are available.
IKJEFF10 — TSO SUBMIT processing
IKJEFF10 runs when a TSO SUBMIT command is issued (foreground or via batch TMP jobs). Use this environment to validate or modify submitted JCL, set return code via EXIT_RC (0 allows submission; 16 prevents it), or set JCLFAIL to YES to block submission.
| Name | Values | Description |
|---|---|---|
| CARD_IMAGE | 1-80 chars | Control statement being processed (typically JOB). |
| EXIT_RC | 0,4,8,12,16 | Return code passed to the SUBMIT exit; set to 16 to prevent submission. |
| JOBNAME / JOBPREFIX / JOBSUFFIX | 1-8 / 1-7 / 1 | Submitted job name and derived prefix/suffix values. |
| SUBJACCT | 1-80 chars | Accounting info for the submitting user. |
Examples
DEFRULE TSODEFLTS
IF &USERID = (S*,T*)
THEN SET LOGONDEST = SYSA
SET TSOSOCLASS = X
SET LOGONFCMD = "LISTDS '&USERID..TEST.JCL'"
IF &USERID = (X*,Y*)
THEN SET LOGONDEST = SYSB
SET TSOSOCLASS = A
DEFRULE LANGRULE
IF &USERID = CAN*
THEN SET &LOGONPLANG = FRQ
SET &LOGONSLANG = ENU
IF &USERID = USA*
THEN SET &LOGONPLANG = ENU
SET &LOGONSLANG = FRQ
DEFRULE LUSERRULE
IF &ENV = IKJEFLD1 &USERID = PRD327*
THEN SET &LOGONUSER = XYZ328
SET &LOGONPASS = PX734S6
SET &LOGONACCT = AC0142
SET &LOGONPROC = IKJPROD1
SET &LOGONREGN = 8192
SET &LOGONFLAG0 = NOPROMPT
DEFRULE NOLOGON
IF &USERID = (ST*,V32472A,TS9745B)
THEN SET &JCLFAIL = YES
SET &TSOXRSN = 99
ISSUE WRITEMSG(LMS1,LMS2,LMS3)
DEFMSG LMS1 '******************************************'
DEFMSG LMS2 'USERID &USERID DISABLED. CONTACT TECH SUPT.'
DEFMSG LMS3 '*********************************************'
DEFRULE NEWPASSRUL
IF &ENV = IKJEFLN2 &USERID = *
&LOGONNPAS NE ' ' /* new password specified */
&LOGONPASS(1,3) EQ &LOGONNPAS(1,3)
THEN ISSUE WRITEMSG(M1)
SET &LOGONREPROMPT = 7
DEFRULE JCLRULE
IF &USERID = (SJP) &ENV = IKJEFLD3
THEN SET &JCL1 = '//SJP001 JOB MSG,TIME=1440'
IF &USERID = (STORADM) &ENV = IKJEFLD3
THEN SET &JCL1 = '//STORADM JOB MSG,TIME=1440,MSGLEVEL=(1,1)'
DEFENV IKJEFF10 MODE(ACTIVE)
DEFRULE EXTEFF10
IF &JOBPREFIX = &USERID THEN EXIT
IF &USERID = APPL* THEN EXIT
IF &CARD_IMAGE(3,1) = (' ','*') THEN EXIT
ELSE SET &JOBPREFIX = &USERID /* set JOBNAME = USERID+SUFFIX */
ISSUE WRITEMSG(DTSM01)
Debugging and tracing
To enable tracing in logon/logoff environments (where an //EXTRACE DD cannot be allocated), set tracing variables within EASY/Exit rules so trace output is displayed at the user's TSO terminal. Example:
DEFRULE TRACERULE CONTINUE(NEXTIF)
IF &USERID = SOMEUSER &ENV = (IKJEFLD1,IKJEFLN1,IKJEFLN2,IKJEFLD2,IKJEFLD3)
THEN SET &RULE_TRACEACT = YES
SET &RULE_PALLACT = YES
If EASY/Exit rules do not appear to receive control, verify that the appropriate IKJEFLD/IKJEFLN modules are present in LPA and that the DIF load library is in the linklist. Use DISPLAY PROG,LPA,MODNAME=<mod> and MODIFY DIF,DM <address> <length> to inspect memory and confirm the entry point.
If TSO exits report IKJ603I or similar messages, the return code gives a clue to which variable or rule caused the error; adjust the rules accordingly or contact DTS Technical Support if required.