Description:
Implement numbered exits through the RHDCUXIT module.
Solution:
Do you need to link RHDCUXIT under SMP? No, not necessarily, though some sites do. Since this is a table, we link RHDCUXIT outside of smp.
In the RHDCUXIT module, you must code a #DEFXIT for each numbered exit. They must be in numerical order. #DEFXIT macros for numbered exits that are not installed are used as place holders.
For example:
* TABLE OF STANDARD EXITS INVOKED BY THE DC SYSTEM ITSELF * #DEFXIT MODE=SYSTEM,CALL=DC,EP=USFEXT0E,AMODE=ANY 00 * EXIT 00 - SYSTEM INITIALIZATION #DEFXIT , EXIT 01 - SIGNON #DEFXIT , EXIT 02 - SIGNOFF #DEFXIT , EXIT 03 - SECURITY CHECK #DEFXIT MODE=SYSTEM,CALL=DC,EP=USFEXT4E,AMODE=ANY 04 * EXIT 04 - NEW TASK #DEFXIT MODE=SYSTEM,CALL=DC,EP=USFEXT5E,AMODE=ANY 05 * EXIT 05 - TASK TERMINATION 1 #DEFXIT MODE=SYSTEM,CALL=DC,EP=SSKXT06E,AMODE=ANY 06 * EXIT 06 - TASK TERMINATION 2 #DEFXIT , EXIT 07 - WRITE TO LOG #DEFXIT , EXIT 08 - LOG FULL #DEFXIT , EXIT 09 - SYSTEM STATISTICS #DEFXIT , EXIT 10 - TICKER INTERVAL #DEFXIT , EXIT 11 - WAIT #DEFXIT , EXIT 12 - TERMINAL I/O ERROR #DEFXIT MODE=SYSTEM,CALL=DC,EP=USFEXTDE,AMODE=ANY 13 * EXIT 13 - SHUTDOWN #DEFXIT MODE=SYSTEM,CALL=DC,NAME=MYUXIT14
In the above example, exits 1,2 and 3 are not installed (place holders), but exit 4 is installed. Exit 4 is defined using the Entry Point calling method. The routine runs as part of the RHDCUXIT nucleus module. Therefore, you must link edit the routine with the RHDCUXIT module. Running the program in RHDCUXIT eliminates the overhead of using a program pool for the exit routine. This strategy is generally advisable for frequently called exits.
(above from sysops manual 7.5.4.1)
Link example:
//LKED EXEC PGM=IEWL, // PARM=(XREF,LET,LIST,NCAL) //SYSPRINT DD SYSOUT=* //SYSUT1 DD UNIT=SYSDA,SPACE=(1700,(500,100)) //SYSLMOD DD DSN=YOUR.DBA.LOADLIB,DISP=SHR //CVLIB DD DSN=YOUR.EXIT.LOADLIB,DISP=SHR //USFLIB DD DSN=YOUR.TOOLS.CWIG0LLT,DISP=SHR //SYSLIN DD DSN=&&OBJECT,DISP=(OLD,DELETE) // DD * INCLUDE USFLIB(USFEXTD) INCLUDE USFLIB(USFEXTF) INCLUDE USFLIB(USFEXTW) INCLUDE USFLIB(USFEXT0) INCLUDE USFLIB(USFEXT3) INCLUDE USFLIB(USFEXT4) INCLUDE USFLIB(USFEXT5) INCLUDE USFLIB(USG2333) INCLUDE USFLIB(SSK2IT04) INCLUDE USFLIB(SSK2IT06) INCLUDE CVLIB(MYUXIT27) ENTRY UXITEP1 NAME RHDCUXIT(R)
As you can see, exit 4, EP=USFEXT4E, is hard linked with the RHDCUXIT.
(The includes don't have the extra E, the #DEFXIT EP= name has the extra E.
One is the module name and the other is the entry point name.)
In the above example Exit 14 is defined using the Name calling method.
ex: #DEFXIT MODE=SYSTEM,CALL=DC,NAME=MYUXIT14
The routine runs as a program under the DC/UCF nucleus. Therefore, you must define the routine to the DC/UCF system by using the system generation PROGRAM statement. At runtime, DC/UCF loads the exit routine into a program pool, as necessary. This strategy is often advisable for infrequently called exits.
This method will cause the named program to be called dynamically at runtime. Remember in local mode, the program should be found to the steplib. While the exit is being tested, and possibly changed frequently, it is easier to use the NAME calling method. If changes need to be made, they can be made, and the program VARIED NEW COPY, instead of having to reassemble/link RHDCUXIT.
To test exit34, client needs to issue a unqualified FIND DBKEY. If defined with NAME= you can then do a DCMT D PRO to verify that it has been loaded and called.
You cannot do an unqualified FIND DBKEY from OLQ. You'll need to write small Cobol test program, since EXIT 34 is only invoked when a run unit issues a FIND DBKEY or OBTAIN DBKEY with no record name specified.
If you don't want the exit to be called, you can remove it from the sysgen, or DCMT VARY PRO xxx DISABLED
This will cause the exit not to be called, and no error message will be issued.