Invoking the DLQ handler on z/OS

Use this topic to understand how to invoke the CSQUDLQH utility program, and its data definition statements.

The CSQUDLQH utility program runs as a z/OS batch program. Specify the name of the dead-letter queue that we want to process and the queue manager on which it resides. We can do this in one of the following two ways (in these examples, the dead-letter queue is called CSQ1.DEAD.QUEUE and the queue manager is called CSQ1):

  1. The names can be specified as positional parameters in the PARM parameter of the EXEC statement within the submitted JCL, for example:
    Figure 1. Specifying the queue manager and dead-letter queue names for the dead-letter queue handler in the JCL
    //READQ EXEC PGM=CSQUDLQH,
    //  PARM='CSQ1.DEAD.QUEUE CSQ1'
    
  2. The names can be specified in the rules table, for example:
    Figure 2. Specifying the queue manager and dead-letter queue names for the dead-letter queue handler in the rules table
    INPUTQ(CSQ1.DEAD.QUEUE) INPUTQM(CSQ1)
    

Any parameters that you specify in the PARM parameter override those in the rules table. If you specify only one parameter in the PARM statement, it is used as the name of the dead-letter queue. The rules table is taken from the SYSIN data set.

For further information on the keywords we can specify, to match and process pattern and action keywords, see Rules (patterns and actions) on z/OS.


Stopping the DLQ handler

The CSQUDLQH utility is stopped when any of the following conditions is true:

  • The dead letter queue is empty for a specified amount of time as configured by the WAIT control data keyword.
  • The dead letter queue is set to GET(DISABLED).
  • The queue manager is quiesced.
  • The CSQUDLQH job is cancelled.

Messages generated during the handling of the queue are written to the standard output when the CSQUDLQH utility ends in a controlled manner. If the handler is cancelled, it does not generate these messages.


Data definition statements

CSQUDLQH requires DD statements with these DDnames:

    SYSOUT
    This statement is required; it names the data set for print output. We can specify the logical record length (LRECL) and block size (BLKSIZE) for this output data set.

    SYSIN
    This statement is required; it names the input data set containing the rules table that specifies what the utility is to do. The logical record length (LRECL) is 80.


Sample JCL

Figure 3. Sample JCL to invoke the CSQUDLQH utility. In this example, queue manager CSQ1 and dead-letter queue CSQ1.DEAD.QUEUE are used because the values specified in the PARM statement override the values specified in the SYSIN data set.
//READQ EXEC PGM=CSQUDLQH,
//      PARM='CSQ1.DEAD.QUEUE CSQ1'
//STEPLIB  DD DSN=thlqual.SCSQAUTH,DISP=SHR
//         DD DSN=thlqual.SCSQLOAD,DISP=SHR
//         DD DSN=thlqual.SCSQANLE,DISP=SHR
//SYSOUT   DD SYSOUT=*
//SYSIN    DD *
INPUTQM(CSQ2) INPUTQ('CSQ2.DEAD.QUEUE')
ACTION(RETRY)
/*
Parent topic: The dead-letter queue handler utility (CSQUDLQH) on z/OS