Previous Topic: Assembler User Exit ProgramNext Topic: Assembler User Exit Control Block


Program Requirements

Parameter List Address

A parameter list address in register 1 points to the following addresses:

Reentrant Exit

The exit must be reentrant. You may elect to issue a #GETSTG to obtain a work area for the program to use and a #FREESTG to release the storage prior to the end of the exit. See Macros for more information.

@MODE Compiler Directive Statement

In the @MODE compiler directive statement, specify MODE=BATCH even if the exit is to run under the DC/UCF environment.

Subschema Control DSECT

Copy the subschema control DSECT (#SSCDS). In addition to this DSECT, an additional field is required for expansion of DML macros. The field definition is:

DMLSEQ   DC    F'0'            DML SEQUENCE NUMBER FOR DEBUGGING

Issue a @BIND

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. Issue a @BIND statement for the first access of each additional record:

@BIND REC=recname,IOAREA=rec-location

Issue CA IDMS/DB Verbs

After the bind is complete you can issue CA IDMS/DB verbs to access the record. For a complete description of all DML verbs see CA IDMS DML Reference Guide for Assembler.

Assemble and Link Edit Requirements

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 to CA IDMS/DB

Include 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 ASSEMBLER
    REENTRANT
    NOPROTECT.

Note: The exit accesses DC/UCF system control blocks, therefore storage protection must be off (NOPROTECT).