NDMX: Non-Discardable Messages user exit (DFSNDMX0 and other NDMX exits)
Use the Non-Discardable Messages exit routine to tell IMS what to do with the input message associated with an abended application program.
If IMS does not call the Non-Discardable Messages exit routine, IMS arbitrarily discards messages from the system and issues message DFS555I.
Subsections:
About this routine
The Non-Discardable Messages exit routine receives control when an IMS application abends with an input message in process.
Attributes of the Non-Discardable Messages exit routine are as follows:
Attribute | Description |
---|---|
IMS environments | DB/DC, DCCTL. |
Naming convention | You can name this exit routine DFSNDMX0 and link it
into a library that is included in the STEPLIB concatenation. If DFSNDMX0 is linked into a library in the STEPLIB concatenation and the USER_EXITS section of the DFSDFxxx member defines exit routines, the exit routines in the DFSDFxxx member are loaded. DFSNDMX0 is only loaded if it is listed as one of the exit routines in the DFSDFxxx member. Alternatively, you can define one or more exit routine modules with the EXITDEF parameter of the USER_EXITS section of the DFSDFxxx member of the IMS.PROCLIB data set. The routines are called in the order that they are listed in the parameter. |
Binding | This exit routine must be reentrant. It runs in non-cross-memory mode. |
Including the routine | If you write your own exit routine and plan to use IMS callable services, you must manually link edit the routine
withDFSCSI00, and you must link the routine with IMS.SDFSRESL. The following example shows the required bind JCL statements.
The module or modules must be included in an authorized library in the JOBLIB, STEPLIB, or LINKLIST concatenation. To use a single exit routine that is named DFSNDMX0, no additional steps are needed. By default, the exit is activated for MPR, JMP, and message-driven BMP region types; IFP and non-message-driven BMP regions are not activated. To use multiple exit routines, specify EXITDEF=(TYPE=NDMX,EXIT=(exit_names)) in the EXITDEF parameter of the USER_EXITS section of the DFSDFxxx member of the IMS.PROCLIB data set. To activate support for message-driven IFP regions or non-message-driven BMP regions, specify the additional parameter NDMX_CALLED_FOR() in the USER_EXITS section of the DFSDFxx member and include the following options:
To learn more, see USER_EXITS section of the DFSDFxxx member. |
IMS callable services | To use callable services with this routine, examine the
value of the SXPLATOK field in the IMS standard user exit
parameter list to see whether a callable services token is passed to the routine.
|
Sample routine location | IMS.ADFSSMPL (member name DFSNDMX0). The mapping of the NDM interface block is available from the IMS library IMS.ADFSMAC (member name DFSNDM). |
Processing options
The following processing options are valid for DFSNDMX0. If you request an option that is not valid, IMS ignores your request and continues normal processing (the default option).
Continue normal processing
Continue normal processing is the default option. Request this option by setting register 15 to zero before returning to IMS. IMS proceeds as if this exit routine had not been called.
Depending on the type of application abend that initiated the exit routine, IMS might delete the message, issue a DFS555I message to the originating terminal and master terminal, and issue a DFS554A message to the master terminal.
Delete the input message from the system
Request this option by setting register 15 to 4 before returning to IMS. If you request this option, IMS performs the following actions:
- Issues a DFS555I message to the originating terminal (if possible) and to the master terminal
- Deletes the input message from the system
- Issues a DFS554A message to the master terminal
Queue the message to the suspend queue
Request this option by setting register 15 to 8 before returning to IMS. If you request this option, IMS queues the input message to the suspend queue of the transaction that was being processed when the application abended. IMS suspends the transaction, and might issue a DFS554A message to the master terminal based on the abend type that occurred.
This option is not applicable to IFP and non-message-driven BMP regions.
Requeue the input message to the original transaction
Request this option by setting register 15 to 12 before returning to IMS. If you request this option, IMS queues the input message to the normal processing queue of the transaction that was being processed when the application abended. IMS USTOPs the transaction unless directed to do otherwise by the contents of NDMTRNST, and might issue a DFS554A message to the master terminal depending on the abend type that occurred.
This option is not applicable to IFP and non-message-driven BMP regions.
Queue the message to an alternate destination
Request this option by setting register 15 to 16 before returning to IMS and placing a valid destination name in the NDMDEST field of the NDM interface block. The following table shows the valid destination types and how to specify them in NDMDEST.
This option is not applicable to IFP and non-message-driven BMP regions.
Alternative destination | NDMDEST value |
---|---|
LTERM | Specify a local, remote, or ETO LTERM, using the LTERM name or ETO user descriptor name. |
OTMA | Specify the OTMA TPIPE name, or a name that is meaningful to the OTMA exit routines. |
LU 6.2 | Specify a local LU 6.2 device descriptor. The LU 6.2 device must be on the local IMS subsystem. |
Transaction | Specify a local or remote transaction code. The
following transaction types are not valid destinations:
If you specify an invalid transaction type, IMS ignores the request and continues normal processing. |
If NDMDEST contains an invalid destination, such as zeros or blanks, IMS ignores the request to change the destination and continues normal processing.
- With OTMA, and ETO or shared queues active
- IMS starts the OTMA exit routines before it starts the Destination Creation exit routine (DFSINSX0).
- Without OTMA, ETO, or shared queues
- IMS ignores the request and continues normal processing.
When IMS requeues the input message to a valid destination, IMS completes the message processing as follows:
- Issues a DFS550I message (succeeded version) to the master terminal
- Issues a DFS555I message to the originating terminal (if possible) and to the master terminal
- Deletes the input message from the abended transaction
- Issues a DFS554A message to the master terminal
Restrictions
Not all destinations are valid alternatives for input messages. You can use this exit routine to requeue messages to alternative destinations.
- Queue the message to the suspend queue.
- Requeue the input message to the original transaction.
- Queue the message to an alternative destination that is named in the NDMDEST field in the NDM interface block.
Communicating with IMS
This exit routine uses a parameter list, entry and exit registers, and the Non-Discardable Messages interface block (NDM) to communicate with IMS.
Contents of registers on entry
Register | Content |
---|---|
1 | Address of the IMS standard user exit parameter list. |
13 | Address of a single standard z/OS® save area. |
14 | Return address to IMS. |
15 | Entry point of this exit routine. |
Standard user exit parameter list
This exit routine uses the Version 6 standard exit parameter list. The address of the work area passed to this exit routine in SXPLAWRK can be different each time that this exit routine is called.
If your NDMX user exit can be called in an enhanced user exit environment, more user exit routines might be called after your routine. When your user exit routine finds a transaction to act upon, it can set SXPL_CALLNXTN in the byte that SXPLCNXT points to, which tells IMS to not call more exit routines.
NDM interface block
The following table shows the contents of the NDM interface block. The address of this parameter list is in the standard user exit parameter list (field name SXPLFSPL). The mapping of the NDM interface block is available from the IMS library IMS.ADFSMAC (member name DFSNDM).
Field | Offset | Length | Content |
---|---|---|---|
NDMEYE | X'00' | 4 | NDM eye catcher. |
NDMTRAN | X'04' | 8 | Transaction that the application was processing when it abended. This transaction is associated with the input message pointed to by NDMMSGA. For non-message-driven BMP regions, the NDMTRAN code is always 0 (zero). |
NDMPSBN | X'0C' | 8 | PSB associated with the application that abended. |
NDMUSID | X'14' | 8 | User ID. |
NDMGRPNM | X'1C' | 8 | Group name. |
NDMUSIDI | X'24' | 1 | Character flag for contents of user ID field NDMUSID:
|
NDMSRCFL | X'25' | 1 | A flag that indicates the origin of the input message.
This flag is set with one of the following values:
|
NDMSRCIN | X'26' | 1 | Start of source description. |
NDMLTERM | X'26' | 8 | Name of the originating LTERM if NDMSRCFL is set to NDMLTERM (value 0). |
NDMNOMSG | X'26' | 8 | Non-message-driven regions set the value NDMNOMSG, which signifies a non-message-driven region with no source input message available, and is indicated by 8 bytes of blanks. |
NDMTPIPE | X'26' | 8 | OTMA TPIPE name if NDMSRCFL is set to NDMOTMA (value 1). |
NDMMEM | X'2E' | 16 | OTMA member name. |
NDMTPSYN | X'3E' | 1 | OTMA TPIPE synchronization level. |
NDMMGSYN | X'3F' | 1 | OTMA message synchronization level. |
NDMLUNM | X'26' | 8 | LU name if NDMSRCFL is set to NDMLU62 (value 2). |
NDMNWID | X'2E' | 8 | Network identifier. |
NDMSIDE | X'36' | 8 | APPC side information name. |
NDMMODE | X'3E' | 8 | VTAM® mode table name. |
NDMTPNML | X'46' | 2 | Length of TP name contained in NDMTPNM. |
NDMTPNM | X'48' | 64 | TP name. |
NDMCONV | X'88' | 1 | APPC conversation type. |
NDMSYNC | X'89' | 1 | APPC synchronization level. |
X'8A' | 17 | Reserved. | |
NDMRGTYP | X'9B' | 1 | IMS Dependent Region type: Value Description x'88' Java Message Processing Region (JMP). x'80' Message Processing Region (MPR). x'50' Message-driven Fast Path Region (IFP). x'40' Message-driven Batch Message Processing Region (BMP). |
NDMABEND | X'9C' | 4 | Abend code in system format 00sssuuu ,
where:
|
NDMTSLCL | X'A0' | 8 | The local timestamp of the arrival of the input message in the system. NDMTSLCL contains the two fields NDMDLCL and NDMTLCL. |
NDMDLCL | X'A0' | 4 | The local date that the message arrived in the system.
The date format is YYYYDDDf , where:
|
NDMTLCL | X'A4' | 4 | The local time that the message arrived in the system.
The time format is HHMMSSTf , where:
|
NDMTSUTC | X'A8' | 12 | The Coordinated Universal Time (UTC) timestamp of the
arrival of the input message in the system. The timestamp format is as follows:
The timestamp fields include the following items:
|
NDMSPAA | X'B4' | 4 | Address of the SPA if the transaction in NDMTRAN is a
conversational transaction. Otherwise, this field contains zeros. If the SPA is present, the
format is as follows:
|
NDMMSGA | X'B8' | 4 | Contains the address of the input message if this field
is nonzero. If this field is zero, there is no message segment, and can be an SPA segment only. The
message format is as follows:
For a single-segment message, the pattern is: LL=NDMMSGL and ZZ=X'FFFF'. For a multi-segment message, the pattern is:
|
NDMMSGL | X'BC' | 4 | Total length of input message |
X'C0' | 20 | Reserved | |
NDMABRSN | X'D4' | 4 | Abend reason code if available. |
NDMTRNST | X'D8' | 4 | Transaction status flag. DFSNDMX0 can set this field to
any one of the following values. IMS examines this field on
return from DFSNDMX0.
|
NDMTRNST (continued) | X'D8' | 4 |
For non-message-driven BMP regions, only codes 1 and 3 apply. For IFP regions, the allowed values that can be specified for NDMTRNST can be any number 1 through 7. However, if NDMTRNST=4 (PSTOP) is specified and the transaction is defined as Fast-Path, exclusive is ignored and the transaction status is set to STOP. This behavior is consistent with the way IMS handles a PSTOP command that is issued against a Fast-Path exclusive transaction. The recommended value for NDMTRNST is 1, which enables the Do not stop Transaction and Program. For both return codes 0 and 4, the Transaction and Program is not stopped. For non-retriable abend situations in IFP regions, the recommended return code is 4. For retriable abends, you cannot stop the program, and the recommended return code is 0. Any other return code is treated as return code 0. The user selected return code is printed in the '67D0' log record for diagnostics purpose. |
NDMDEST | X'DC' | 8 | Name of the alternative destination to which the input message is to be queued. IMS examines this field only if you pass return code 16 in register 15. Otherwise, IMS ignores this field. |
Contents of registers on exit
Return code | Meaning |
---|---|
0 | Continue normal processing. |
4 | Delete the input message from the system. This return code is not applicable for non-message-driven BMP regions. |
8 | Queue the input message to the suspend queue.
This return code is not applicable to IFP or non-message-driven BMP regions. |
12 | Requeue the input message to the original
transaction. This return code is not applicable to IFP or non-message-driven BMP regions. |
16 | Queue the message to an alternative destination that
is named in the NDMDEST field in the NDM interface block. This return code is not applicable to IFP or non-message-driven BMP regions. |
For return codes 0 and 4, the Transaction and Program are not stopped. For non-retriable abend situations in IFP regions, the recommended return code is 4. For retriable abends, you cannot stop the program, and the recommended return code is 0. Any other return code is treated as return code 0. The user selected return code is printed in the '67D0' log record for diagnostics purpose.