LOGOFF: Exit TSO directly from ISPF

To create a selection on the primary menu that allows automatic logoff, for example an =LOGOFF jump command, change panelISR@PRIM as follows:

1. Add to the)INIT section:

IF (&LOGFFCMD = 'CMD(TSOEXEC LOGOFF)')
   &ZCMD = X
   .RESP = ENTER

2. Then in the )PROC section, before the &ZSEL assignment, add:

&ZCMDTRNC=TRUNC(&ZCMD,'.')
IF (&ZCMDTRNC = LOGOFF)
    IF (&ZSPLIT = YES) &LOGFFCMD = 'EXIT'
    ELSE &LOGFFCMD = 'CMD(TSOEXEC LOGOFF)'

3. Finally add a selection in the &ZSEL list in the )PROC section:

LOGOFF,&LOGFFCMD