IMS Non-discardable Messages Exit

The non-discardable messages exit routine enables you to specify to Enterprise Server how to handle an input message associated with an abended IMS application program. The exit routine receives control when an application abends with an input message in process. If a non-discardable messages exit does not exist, Enterprise Server discards the input message.

Note: Data is always passed to and from the non-discardable messages exit in ASCII.

Invocation

The non-discardable messages exit routine is invoked when an application abends while an input message is in process.

Coding Requirements

Filename and Location
You must name the exit routine program DFSNDMX0.cbl, and it must reside in the directory specified by the ES_IMS_EXITPATH environment variable.
Processing Options
The following processing options are valid:
Continue normal processing
Continue normal processing is the default option. Request this option by setting the return code to zero before returning to Enterprise Server. If you request this option, Enterprise Server proceeds as if this exit routine had not been called. Enterprise Server stops the transaction that was being processed when the application abended, deletes the input message from the system, and issues a DFS555I message to the originating terminal (if possible).
Delete the input message from the system
Request this option by setting the return code to 4 before returning to Enterprise Server. If you request this option, Enterprise Server stops the transaction that was being processed, deletes the input message from the system, and issues a DFS555I message to the originating terminal.
Move the input message to the suspend queue
Request this option by setting the return code to 8 before returning to Enterprise Server. If you request this option, Enterprise Server stops the transaction that was being processed, moves the input message to the suspend queue of the transaction, and issues a DFS555I message to the originating terminal.
Requeue the input message to the original transaction
Request this option by setting the return code to 12 before returning to Enterprise Server. If you request this option, Enterprise Server requeues the input message to the normal processing queue of the transaction that was being processed. Enterprise Server stops the transaction and issues a DFS555I message unless directed to do otherwise by the contents of the NDMTRNST field of the NDM interface block (see below).
Queue the input message to an alternate destination
Request this option by setting the return code to 16 and placing a valid destination in the NDMDEST field of the NDM interface block before returning to Enterprise Server. The alternate destination can be a transaction code or an LTERM name. If you request this option, Enterprise Server stops the transaction that was being processed, queues the input message to the alternate destination, issues a succeeded message to the Enterprise Server console, and issues a DFS555I message to the originating terminal. If NDMDEST contains an invalid destination (such as zeros or blanks) or a destination that is unknown to Enterprise Server, Enterprise Server ignores the request to change the destination and continues normal processing.
Communication with Enterprise Server
To enable communication with Enterprise Server, the exit routine must specify parameters from the standard user exit parameter list and use the non-discardable messages (NDM) interface block. See Standard User Exit Parameters and Non-discardable Messages (NDM) Interface Block for more information.
Return Codes
Before returning to Enterprise Server, the exit routine must set one of the following return codes:
Return Code Description
0 Continue normal processing.
4 Delete the input message from the system.
8 Move the input message to the suspend queue.
12 Requeue the input message to the original transaction.
16 Queue the input message to an alternate destination that is named in the NDMDEST field of the NDM interface block.