CSLDMI: ODBM application program interface
Application programs written in assembler and running on z/OS® can access IMS databases managed by IMS DB in DBCTL and DB/DC systems in an IMSplex by using the CSL Open Database Manager (ODBM) CSLDMI API.
The CSLDMI API supports all of the DL/I calls supported by the IMS ODBA interface, global and local transaction processing, and security.
Prior to issuing the CSLDMI request, the ODBM client must first register with ODBM by issuing the CSLDMREG request.
The CSLDMI API includes the following function calls:
- BACKOUT
- Backs out a local unit of work for local transactions. A local unit of work consists of a single APSB call that has work, such as DL/I calls, associated with the APSB thread.
- COMMIT
- Commits a local unit of work for local transactions. A local unit of work consists of a single APSB call that has work, such as DL/I calls, associated with the APSB thread.
- DSECT
- Includes equate (EQU) statements in an application program for the length of a CSLDMI parameter list and for CSLDMI return and reason codes.
- ODBMCI
- To issue DL/I calls to IMS databases, use the ODBMCI function. DL/I calls are passed to IMS by using the DLIFUNC parameter of the ODBMCI function.
- READYSYNCPT
- Prepares for syncpoint processing for each of the multiple APSB calls within a global unit of work.
Subsections:
CSLDMI FUNC=BACKOUT syntax
CSLDMI FUNC=COMMIT syntax
CSLDMI FUNC=DSECT syntax
CSLDMI FUNC=ODBMCI syntax
CSLDMI FUNC=READYSYNCPT syntax
CSLDMI function parameters
The CSLDMI parameters specify the ODBM values required for communicating with ODBM and accessing IMS databases.
The addresses can be specified as either a symbol or a register from 2 to 12.
Parameters that are supported only when the ODBMCI function is specified are noted in the description of the parameters. Parameters that are not noted as being supported by ODBMCI only, can be specified on all CSLDMI functions other than DSECT.
- AIB=symbol | (r2-r12)
- (Required) - Specifies the address of the application interface block (AIB). The AIB parameter is required on both input to and output from ODBM. This parameter is supported only on the ODBMCI function call.
- APSBTOKEN=symbol | (r2-r12)
- (Required) - Specifies an address for a 16-byte ODBM APSB token. An APSB token is returned by CSLDMI on the initial APSB thread request and is required on all subsequent calls targeted to this thread.
- CLIENTID=symbol | (r2-r12)
- (Optional) - Specifies the end user client application ID as defined by the end user client.
- CLIENTIDLEN=symbol | (r2-r12)
- (Required when CLIENTID is specified) - Specifies the length of the client ID.
- CTXTOKEN=symbol | (r2-r12)
- (Optional) - Specifies a 16-byte RRMS Context Services context token. This may be the native context token, or a private token obtained by calling the Context Services Begin_Context service (CTXBEGC).
- DLIFUNC=symbol | (r2-r12)
- (Required) - Specifies the 4-byte DL/I call. Any DL/I call that is supported by the Open Database Access (ODBA) callable interface can be specified. This parameter is supported only on the ODBMCI function call.
- ECB=symbol | (r2-r12)
- (Optional) - Specifies an MVS event control block (ECB) that is used for asynchronous requests. When the request is complete, the ECB specified is posted.
- GROUPNAME=symbol | (r2-r12)
- (Optional) - Specifies a group name for RACF® or an equivalent security product. The group name pertains to the APSB call only (DLIFUNC=APSB) and is ignored for all other DL/I calls.
- GROUPNAMELEN=symbol | (r2-r12)
- (Required when GROUPNAME is specified) - Specifies the length of the group name.
- IOAREA=symbol | (r2-r12)
- (Conditionally required) - Specifies an I/O area that is used for the input or output data related to a database DL/I call. The IOAREA and IOAREALEN parameters are required only when a DL/I call that requires input data or that returns output data is specified on the DLIFUNC parameter. This parameter is supported only on the ODBMCI function call.
- IOAREALEN=symbol | (r2-r12)
- (Conditionally required) - Specifies the length of the I/O area specified by the IOAREA parameter. The IOAREA and IOAREALEN parameters are required only when a DL/I call that requires input or that returns output is specified on the DLIFUNC parameter. This parameter is supported only on the ODBMCI function call.
- ODBMNAME=symbol | (r2-r12)
- (Required) - Specifies the 8-byte ODBM name to which to the CSLDMI
request is to be sent.
If the ODBMNAME parameter is specified as a symbol, the symbol must be the label of the ODBM field. If the ODBMNAME parameter is specified as a register, the register must contain the address of the ODBM name field.
- PARM=symbol | (r2-r12)
- (Required) - Specifies the address CSLDMI parameter list. The
length of the parameter list must be at least as long as the value
assigned to
DMI_PARMLNin the CSLDMI macro. - PCB=symbol | (r2-r12)
- (Optional) - An output parameter that specifies the address of a fullword storage area to receive the address of the program communication block (PCB) returned by IMS after processing a DL/I call. The PCB contains the status codes related to a DL/I call and other fields. This parameter is supported only on the ODBMCI function call.
- PCBLEN=symbol | (r2-r12)
- (Conditionally required) - Specifies the length of the PCB returned by DL/I call processing. The PCBLEN parameter is required when the PCB parameter is specified. This parameter is supported only on the ODBMCI function call.
- PROTOCOL=MSG | RQST
- (Optional) - Specifies the SCI protocol for sending the request to ODBM.
- RETCODE=symbol | (r2-r12)
- (Required) - Specifies a 4-byte field to receive the return code
on output. ODBM return codes are defined in the CSLDRR. SCI return
codes are defined in CSLSRR.
The return code can be from ODBM (CSLDMI) or SCI (CSLSCMSG or CSLSCRQS). If an ECB is specified, the value of RETCODE is not valid until the ECB is posted. All return codes contain the SCI-member-type indicator for either SCI or ODBM in the high order byte (X'01' for SCI or X'04' for ODBM).
- RQSTTKN1=symbol | (r2-r12)
- (Conditionally optional) - Specifies a 16-byte user-generated request token that correlates an output response to its associated input request for asynchronous processing. ODBM returns the address of this token in the DDIR_DMIRQT1PTR field of the ODBM directive parameter list that is mapped by CSLDMDIR.
- RSNCODE=symbol | (r2-r12)
- (Required) - Specifies a 4-byte field to receive the reason code on output. ODBM reason codes are defined in the CSLDRR macro. SCI reason codes are defined in CSLSRR.
- SCITOKEN=symbol | (r2-r12)
- (Required) - Specifies a 16-byte field containing the SCI token.
This token uniquely identifies this connection to SCI. The SCI token
is returned by a successful
CSLSCREG FUNC=REGISTERrequest. - SECTKNLEN=symbol | (r2-r12)
- (Conditionally required) - Specifies the length of the security token. The SECTKNLEN parameter is required when the SECTOKEN parameter is specified. This parameter is supported only on the ODBMCI function call.
- SECTOKEN=symbol | (r2-r12)
- (Conditionally optional) - Specifies the address of a variable length security token that is used for security checking by RACF or an equivalent security product. The security token applies only to the APSB DL/I call that is specified by DLIFUNC=APSB. The security token is ignored for all other DL/I calls. This parameter is supported only on the ODBMCI function call. This security token is used only if the client address space is an authorized caller. If the client address space is unauthorized, the user ID is obtained automatically from z/OS control blocks.
- SSAn=symbol | (r2-r12)
- (Optional) - Specifies the segment search arguments (SSAs) for a DL/I call. A maximum of 15 SSAs can be specified: SSA1 through SSA15. This parameter is supported only on the ODBMCI function call.
- SSAnLEN=symbol | (r2-r12)
- (Conditionally required) - Specifies the length of the corresponding SSA list area. For every SSAn parameter specified, a corresponding SSAnLEN parameter is required, specified as SSA1LEN up through SSA15LEN. This parameter is supported only on the ODBMCI function call.
- URTOKEN=symbol | (r2-r12)
- (Optional) - Specifies a 16-byte RRS parent unit of recovery (UR) token obtained by calling the RRS Express_UR_Interest service that supports cascaded transactions (ATREINT2 or higher).
- USERID=symbol | (r2-r12)
- (Optional) - Specifies the user ID to be used by RACF or an equivalent security product. Use this parameter only if your client address space has been authorized for this request. If your client is not authorized, the user ID is obtained automatically from z/OS control blocks. The user ID pertains to the APSB call only (DLIFUNC=APSB) and is ignored for all other DL/I calls.
- USERIDLEN=symbol | (r2-r12)
- (Required when USERID is specified) - Specifies the length of the user ID.
CSLDMI return and reason codes
| Return code | Reason code | Meaning |
|---|---|---|
| X'00000000' | X'00000000' | The CSLDMI request completed successfully. |
| X'04000004' | X'00001004' | The Input user exit rejected the request. |
| X'04000008' | X'00002018' | Invalid AIB parameter. |
| X'0000201C' | Invalid value is specified in the AIBRSNM1 field of the AIB mask. | |
| X'00002020' | Unsupported DL/I function. | |
| X'00002024' | The Input user exit incorrectly set the AIBOALEN field of the IAB mask to a value that is greater than the value that is specified on the IOAREALEN parameter. | |
| X'00002060' | The DRDA code point sent by the client was not found in the table of ODBM supported DRDA code points. | |
| X'04000010' | X'00004000' | Unable to locate the alias name. |
| X'00004004' | The client is not registered. | |
| X'00004008' | The data store was not acquired. | |
| X'04000014' | X'00005004' | Unable to obtain an APSB control block. |
| X'00005008' | Unable to obtain an AIB control block. | |
| X'00005014' | Hash table ADD failed for APSB block. | |
| X'00005018' | Hash table FIND failed for APSB block. | |
| X'00005034' | OUTPUT buffer allocation failed. | |
| X'00005040' | RRS0_ASSOCCTX failed. | |
| X'00005044' | RRS0_DISCTX failed. | |
| X'00005048' | RRS0_COMMIT3_DMIR failed. | |
| X'0000504C' | RRS0_SUSI failed. | |
| X'00005050' | RRS0_BACKOUT3_DMIR failed. | |
| X'00005054' | APSB token length error. | |
| X'00005058' | APSB hash table RELEASE failed. | |
| X'0000505C' | RRS0_ASSOCCTX3 failed. | |
| X'00005060' | RRS0_CASCADE3 failed. | |
| X'00005064' | RRS0_GETCTX2 failed. | |
| X'00005068' | RRS0_ENDCTX2 failed. | |
| X'0000506C' | SEC0_CREATE call failed. | |
| X'00005070' | SEC0_DELETE call failed. | |
| X'00005074' | An APSB call failed to schedule a PSB. | |
| X'00005078' | PSB Name error. | |
| X'00005080' | PAPL block allocation failed. | |
| X'00005084' | RRS not active for global transaction. | |
| X'0000507C' | Failed to obtain DMI IOA storage. | |
| X'00005094' | BPETCBSW to an ORRS TCB failed. | |
| X'00005098' | BPETCBSW to an ODRA TCB failed. | |
| X'0000509C' | Failed to obtain an ORRS TTE. |
