Figure 1 is an example of the IGXMSGEX
exit routine.
Figure 1. Sample Listing of IGXMSGEX
Part 1 of 2IGXMSGEX CSECT
IGXMSGEX AMODE 31
IGXMSGEX RMODE ANY
STM 14,12,12(13) save callers registers
LR 12,15 establish base register
USING IGXMSGEX,12
* NOTE: This module must be RE-ENTRANT!!! This example does not
* obtain a save area, but if one is necessary, it would need to
* be GETMAINed.
*
* To test for a specific job name or step name the following
* code sequence may be used
* NOTE: This code assumes that a deferred tape mount is done
* if deferred tape mounts are not requested, the TIOCNJOB
* field will contain 'INIT ' and the TIOCSTEP+8 field
* will contain the 8 byte job name
USING PSA,0
L 15,PSATOLD get TCB address
USING TCB,15 map TCB
L 15,TCBTIO get TIOT address
USING TIOT,15 map TIOT
LTR 15,15 is there a TIOT
BZ NOTIOT no, branch
CLC TIOCNJOB,MYJOB check for interesting job
BNE NOTMYJOB branch if "not my job"
CLC TIOCSTEP(8),MYSTEP check for interesting step
BNE NOTMYSTP branch if "not my step"
DROP 15
* Of the bits in the control byte, only the ACL request bit
* may be modified. If any other bit is changed, IGX00030 will
* reset it to the original state. If the ACL request bit is
* set on, it will only be honored if the device actually
* supports the automatic cartridge load (ACL) feature. The UCB
* can be tested to ensure that the ACL feature is supported.
* The system will have set ACL request bit on if the device
* supports ACL, the ACL load is ready, and the volser is SCRTCH or
* PRIVAT.
USING PLIST,1 map input parameters
L 2,MSGTEXTA get message text address
USING MSGTEXT,2 map message text
TM CONTROL,ACL is ACL request bit on
BO ACLON yes branch
L 3,UCBA get UCB address from PLIST
USING UCB,3
Figure 2. Sample Listing of IGXMSGEX Part 2 of 2* We could just always set the bit on and let the calling module
* (IGX00030) test to see if the ACL is supported, but we will test
* the UCB just as an example.
TM UCBTFL1,UCBCSL is ACL supported
BNO ACLOFF no, branch
OI CONTROL,SETACLON set ACL request bit on
SETACLON EQU X'01' ACL on bit
ACLON EQU * ACL on
ACLOFF EQU * ACL off
*
NOTMYJOB EQU *
NOTMYSTP EQU *
NOTIOT EQU *
* NOTE: This exit could also be used to update the message text
* in the parameter list (i.e. MSG1 and MSG2 fields). An example
* of this has not been included because the update would be
* specific to implementation details of a specific installation.
LM 14,12,12(13) restore callers registers
SR 15,15 set return code, (not used by
* IGX00030, just good practice)
BR 14 return to caller
MYJOB DC CL8'MYJOB' job name of interest
MYSTEP DC CL8'MYSTEP' step name of interest
* Parameter list pointed to be register 1
PLIST DSECT
UCBA DS A UCB address
MSGTEXTA DS A Message text address
MSGTEXT DSECT
CONTROL DS CL1
ACL EQU X'01' ACL request bit
MSG1 DS CL8 first message
MSG2 DS CL8 second message
****** Include control block mapping macros
IHAPSA PSA mapping
IKJTCB TCB mapping
TIOT DSECT provide DSECT statement for TIOT
IEFTIOT1 TIOT mapping
UCB DSECT provide DSECT statement for UCB
IEFUCBOB UCB mapping
END