Some CICS TS (Transaction Server) system messages written to TD queues tend to flood zOS JES spool. For example:
DFHSN1400 07/19/2012 17:04:32 CICSPACK Session signon for session J1 by user CTGRUS is complete.
DFHSN1500 07/19/2012 17:04:32 CICSPACK Session signoff for session J1 is complete. 1 transactions entered with 0 errors.
Each CTG (CICS Transaction Gateway) transaction causes two messages to display, first one is for signon, the other is for signoff. In a high utilized environment, thousands of messages printed on spool in minutes.
I observe that some colleagues either recycle CICS TS systems or set MSGUSR DD statement to DUMMY. Unscheduled recycles cause downtime. Setting spool listings to DUMMY may cause to miss some important messages.
CICS TS message domain exit XMEOUT may be a solution for this and similar situations. This exit allows you to suppress or reroute CICS TS and CPSM (CICSPlex System Manager) messages that use the message domain.
Product ID (“DFH” for CICS TS, “EYU” for CPSM), two-character domain name and message number parameters are passed to exit and return code 4 is used for suppressing the message.
Following code can be inserted in the sample exit in CICS TS sample library, member USREXIT1:
010500 *
010600 **********************************************************
010700 * <<<<<< SECTION TO BE MODIFIED BY THE USERS. >>>>>> *
010800 * START. *
010900 **********************************************************
011000 L R3,UEPCPID
011100 CLC 0(3,R3),=C’DFH’ CHECK PRODUCT ID
011200 BNE RCNORMAL IF NOT DFH, THEN RET CODE NORMAL
011400 **********************************************************
011500 * CTG SIGNON-SIGNOFF MESSAGE SUPPRESSION MODIFICATION
011600 **********************************************************
011700 L R3,UEPCPDOM LOAD DOMAIN CODE ADDRESS
011800 *
011900 CLC 0(2,R3),=C’SN’ IS IT SIGNON DOMAIN?
012000 *
012100 BNE USR_SIGNON_DOMAIN_END NO, BRANCH TO END OF CHECK
012200 *
012300 * SIGNON DOMAIN MESSAGES
012400 *
012500 L R3,UEPCPNUM LOAD MESSAGE NUMBER ADDRESS
012600 *
012700 * CHECK DFHSN1400 SESSION SIGNON COMPLETE.. MESSAGE
012800 *
012900 CLC 0(4,R3),=F’1400′ IS IT SIGNON MESSAGE?
013000 *
013100 BE RCBYPASS YES, BRANCH TO SUPPRESS
013200 *
013300 * CHECK DFHSN1500 SESSION SIGNOFF COMPLETE.. MESSAGE
013400 *
013500 CLC 0(4,R3),=F’1500′ IS IT SIGNOFF MESSAGE?
013600 *
013700 BE RCBYPASS YES, BRANCH TO SUPPRESS
013800 *
013900 USR_SIGNON_DOMAIN_END DS 0H
014000 **********************************************************
014100 * CTG SIGNON-SIGNOFF MESSAGE SUPPRESSION MODIFICATION END
014200 **********************************************************
014300 L R3,UEPCPNUM
014400 CLC 0(4,R3),=F’8320′ CHECK MESSAGE NUMBER
014500 BNE RCNORMAL IF NOT 8320, THEN RET CODE NORMAL
014600 *
014700 L R3,UEPCPDOM
014800 CLC 0(2,R3),=C’DX’ CHECK DOMAIN
014900 BE RCBYPASS IF DX DOMAIN, THEN RET CODE BYPASS
015100 **********************************************************
015200 * END. *
015300 * <<<<<< SECTION TO BE MODIFIED BY THE USERS. >>>>>> *
015400 **********************************************************
015500 *
Give a proper name to to-be exit, assemble and link it to a library in DFHRPL chain though I recommend you to prepare an SMPE USERMOD. Define exit program to CICS system using your conveinent resource definition method:
CEMT INQUIRE PROGRAM(‘USREXIT1’)
I PROG(USREXIT1)
STATUS: RESULTS – OVERTYPE TO MODIFY
Prog(USREXIT1) Leng(0000000144) Ass Pro Ena Pri Ced
Res(001) Use(0000000001) Any Uex Ful Qua Cic Nat
You can use CICS TS ENABLE and DISABLE SPI (System Programming Interface) commands to initiate and terminate XMEOUT exit respectively. CICS TS command level interpreter transaction CECI is a convenient way to issue CICS TS API (Application Programming Interface) and SPI commands:
CECI ENABLE PROGRAM(‘pgmname’) EXIT(‘XMEOUT’) START
CECI DISABLE PROGRAM(‘pgmname’) EXIT(‘XMEOUT’) STOP
One last thing may be to start the exit when CICS TS region is started. Any command level program inserted in PLTPI (Program List Table Post Initialization) table will do that. That program will issue ENABLE command. PLTPI program will execute at startup and exit will start at startup. I include an assembler sample not to mess with language processors and LE (Language Environment) considerations:
001200 //*
001300 //TRN.SYSIN DD *
001400 *ASM XOPTS(SP)
001500 TITLE ‘USREXIT – EXIT STARTED THROUGH PLTPI’
001600 PRINT NOGEN
001700 USREXIT AMODE 31
001800 USREXIT RMODE ANY
001900 DFHEISTG DSECT ,
002000 *
002100 DBL1 DS D DECIMAL CONV.WRK.AREA
002200 *
002300 USRRESP DS F
002400 USRRESP2 DS F
002500 *
002600 * MESSAGES
002700 * ….+….1….+….2….+….3….+….4….+….
002800 * USR0001I EXIT STARTED
002900 * USR0002I EXIT NOT STARTED RESP XXX RESP2 XXX
003000 *
003100 USRWTO DS CL48
003200 ORG USRWTO
003300 USRWTO1 DS CL31
003400 WTORESP DS CL4
003500 USRWTO2 DS CL6
003600 WTORESP2 DS CL4
003700 ORG ,
003800 *
003900 USREXIT DFHEIENT , CODEREG=REG03,EIBREG=REG11,DATAREG=REG13 DEFAULTS
004000 *
004100 EXEC CICS ENABLE PROGRAM(‘USREXIT1’) EXIT(‘XMEOUT’) START C
004200 RESP(USRRESP) RESP2(USRRESP2)
004300 *
004400 CLC USRRESP,DFHRESP(NORMAL) RC = 0?
004500 BE NORMAL_EOP YES, BRANCH
004600 *
004700 * DISPLAY RESP AND RESP2
004800 *
004900 MVI USRWTO,C’ ‘ MOVE SPACES TO ..
005000 MVC USRWTO+1(L’USRWTO-1),USRWTO MSG AREA
005100 *
005200 MVC USRWTO1,=C’USR0002I EXIT NOT STARTED RESP’
005300 *
005400 L WRK0,USRRESP LOAD RESP
005500 CVD WRK0,DBL1 CONVERT TO DECIMAL
005600 MVC WTORESP,=X’40202120′ MOVE IN EDIT MASK
005700 ED WTORESP,DBL1+6 EDIT LAST 3 DIGITS
005800 *
005900 MVC USRWTO2,=C’ RESP2′
006000 *
006100 L WRK0,USRRESP2 LOAD RESP2
006200 CVD WRK0,DBL1 CONVERT TO DECIMAL
006300 MVC WTORESP2,=X’40202120′ MOVE IN EDIT MASK
006400 ED WTORESP2,DBL1+6 EDIT LAST 3 DIGITS
006500 *
006600 B EOP1
006700 *
006800 NORMAL_EOP DS 0H
006900 MVI USRWTO,C’ ‘ MOVE SPACES TO ..
007000 MVC USRWTO+1(L’USRWTO-1),USRWTO MSG AREA
007100 * ….+….1….+….2.
007200 MVC USRWTO1(21),=C’USR0001I EXIT STARTED’
007300 *
007400 EOP1 DS 0H SEND WTO
007500 *
007600 EXEC CICS WRITE OPERATOR TEXT(USRWTO)
007700 *
007800 EXEC CICS RETURN
007900 *
008000 LTORG ,
008100 *
008200 REGBAL EQU 2
008300 REG03 EQU 3 DEFAULT BASE REG
008400 REG11 EQU 11 DEFAULT EIB REG
008500 REG13 EQU 13 DEFAULT DYNAMIC STG REG
008600 WRK0 EQU 4 USED FOR DECIMAL CONVERSION
008700 *
008800 REG05 EQU 5
008900 REG06 EQU 6
009000 REG07 EQU 7
009100 REG08 EQU 8
009200 REG09 EQU 9
009300 REG10 EQU 10
009400 REG12 EQU 12
009500 END ,
Please note statements to test RESP and RESP2 response codes of ENABLE command and display them if nonzero.
You can test the program using CECI transaction after defining it to CICS TS system.
CEMT INQUIRE PROGRAM(‘USREXIT’)
I PROG(USREXIT)
STATUS: RESULTS – OVERTYPE TO MODIFY
Prog(USREXIT) Leng(0000000000) Ass Pro Ena Pri Ced
Res(000) Use(0000000000) Any Uex Ful Qua Cic
CECI LINK PROGRAM(‘SGKEXIT’)
After successful completion, you should see “USR0001I EXIT STARTED” message on zOS JES spool JOBLOG for that CICS region. If you execute more than once you see “USR0002I EXIT NOT STARTED” message with nonzero RESP and RESP2 codes mentioning it is already ENABLEd.
Finally insert the program in PLTPI table and exit will start at next CICS TS recyle.