Quasi-Reentrant Exit
The exit must be quasi-reentrant. Under central version, this requires no additional processing. Under local mode, the exit must initialize all work fields programmatically. A quasireentrant program retains the working storage values last set by a previous call to the program. CA IDMS/DB and CA IDMS VSAM Transparency do not re-initialize the fields when executing in local mode.
ENVIRONMENT DIVISION
In the ENVIRONMENT DIVISION, specify MODE IS BATCH, even if the exit is to run under CA IDMS/DC.
LINKAGE SECTION
In the LINKAGE SECTION, include:
Example
LINKAGE SECTION.
01 USER-EXIT-CONTROL-BLOCK.
.
.
.
COPY IDMS SUBSCHEMA-CTRL.
.
.
.
01 USER-RECORD.
.
.
.
PROCEDURE DIVISION
USING USER-EXIT-CONTROL-BLOCK, SUBSCHEMA-CTRL, USER-RECORD.
PROCEDURE DIVISION
In the PROCEDURE DIVISION, do not copy SUBSCHEMA-BINDS. The rununit is bound prior to the exit receiving control. CA IDMS VSAM Transparency binds the record defined in the FMT the first time it attempts to access it. The exit must issue a bind only for additional records it needs.
More information:
For more information on coding CA IDMS/DB and DC/UCF programs see CA IDMS Navigational DML Programming Guide.
Compiling and Linking the Program
Compile and link the program once the user exit is complete and you have run the program through the DMLC preprocessor. Link the following modules with the exit:
INCLUDE libname(ESVSIDMS) INCLUDE libname(IDMSBALI)
Note: Libname is the DD name of the file in the JCL that contains the CA IDMS/DB-supplied object modules.
Defining the Exit
Define the exit to CA IDMS/DB by including an ADD PROGRAM statement for the exit program in the system generation. The ADD PROGRAM statement should appear as follows:
ADD PROGRAM exitname
LANGUAGE IS COBOL
QUASIREENTRANT
NOPROTECT.
Note: The exit accesses DC/UCF system control blocks, therefore storage protection must be off (NOPROTECT).
|
Copyright © 2014 CA.
All rights reserved.
|
|