IMS attachment facility macro (DSNMAPN)

The DSNMAPN macro is required when the IMS application load module name is different than the name of its related IBM® Db2 application plan. The macro is also required if the error option is different than the ERR value that is specified on the IMS SSM entry.

Macro statements are assembled in prefix.SDSNMACS and must be link-edited as REENTRANT with RMODE=24 into the Db2 library prefix.SDSNLOAD. The module name must be specified on the IMS SSM entry for the Db2 subsystem. The name must be specified as in the RTT entry for the SSM member defining the connection of this region. IMS loads the RTT module into the dependent region address space.

Note:
  1. The macro name must be followed by one or more blanks before options are coded.
  2. Multiple options must be separated by commas (with no blanks).
label DSNMAPN
DSNMAPN is the name of the macro. It must be coded exactly as it appears here, and it must be separated from any optional options by one or more blanks.

For label, substitute the CSECT name of your module. This name must match the name of the module specified to the linkage editor. Label is optional except for the first invocation of the DSNMAPN macro. The last invocation requires END=YES.

APN=program-name
Specifies the name of an application load module scheduled by IMS. For program-name, substitute an application name of up to eight characters.
PLAN=plan-name
Specifies an application plan name that is used (instead of the default application name) when a thread is created. For plan-name, substitute an application plan name of up to eight characters.
OPTION=R|Q|A
Specifies the action taken when an application program call cannot be performed because there is some problem in communication between the application program and the Db2 subsystem or if resources are unavailable. The value can be R, Q, or A.
If OPTION is not specified, the region error option (REO) is used.
R
Specifies that a return code is returned to the application to indicate that the request for Db2 services failed.
Q
Specifies that the transaction is abnormally terminated with an abend code U3051, activity is backed out to the last commit point, and the input message is re-queued.
A
Specifies that the transaction is abended with an abend code of U3047, and the input message is deleted.

Default: R

END=NO|YES
Specifies whether this is the last DSNMAPN macro invocation. The value can be NO or YES.
NO
Specifies that this is not the last DSNMAPN macro invocation.
YES
Specifies that this is the last DSNMAPN macro invocation.

Default: NO

The last DSNMAPN macro invocation must be followed by the specification END=YES.

Usage notes

  • To enter more than one application name (with its corresponding plan name and OPTION specification), you must use multiple invocations of the DSNMAPN macro. The first invocation requires the label; the last invocation requires END=YES.
  • Invocations must be in ascending order by application name. If they are not, an MNOTE macro error is generated.