Previous Topic: Communicating with Database ProceduresNext Topic: ACCEPT PROCEDURE CONTROL LOCATION


BIND PROCEDURE

The BIND PROCEDURE statement establishes communication between your program and a DBA-written database procedure. Additionally, the specified data in variable-storage is copied to the application program information block in the central version.

When to Use It

Consult with your DBA to determine when to issue the BIND PROCEDURE. After issuing a BIND PROCEDURE statement, you can modify fields in the 256-byte block without affecting communications with the procedure (for example, by using the ACCEPT PROCEDURE CONTROL LOCATION statement). The data passed is the information contained in the block at the time of the BIND PROCEDURE statement.

Example of the Definition in Variable Storage

The program excerpt below shows a sample 256-byte DBA-defined application program information block as listed in program variable storage.

DATA DIVISION
WORKING-STORAGE SECTION.
01  CHECKID                 PIC X(8)     VALUE 'CHECKID'.
01  CHECKID-CTRL.
    05 CHECKID-DATE         PIC X(8).
    05 CHECKID-USER         PIC X(32).
    05 CHECKID-INFO         PIC X(216).