The BIND PROCEDURE statement establishes communication between your program and a DBA-written database procedure (for example, a security routine). Use this statement only in those instances in which the DBA-written procedure requires more information from your program than the DBMS provides. Such instances are unusual. Usually, you will not be aware of which procedures gain control before or after various DML functions.
You can use the BIND PROCEDURE statement in both the navigational and Logical Record Facility (LRF) environments.
►►──── BIND PROCEDURE (procedure-name) TO (procedure-control-location); ──────►◄
Specifies the name of the DBA-written database procedure for which you want to establish addressability. Procedure-name must refer to an 8-character field in variable storage.
Specifies the location to which the named procedure will be bound. Procedure-control-location is a fullword-aligned 256-byte area in variable storage.
If your program runs in a different partition than the central version, it may need to pass information to the database procedure. When the DBMS invokes the database procedure, it copies this information from the program storage area identified by procedure-control-location into the IDMS application program information block. The information passed is the information in procedure-control-location when the BIND PROCEDURE was performed; it is not the information in the program's storage at the time of the procedure call.
The following statement binds the procedure with the variable name PROGCHEK to the 256-byte area PROC_CTL:
BIND PROCEDURE (PROGCHEK) TO (PROC_CTL);
Upon completion of the BIND PROCEDURE function, the ERROR_STATUS field in the IDMS DB communications block indicates the outcome of the operation:
The request was serviced successfully.
The DBMS cannot recognize the BIND PROCEDURE statement. This code usually indicates that the IDMS DB communications block (SUBSCHEMA_CTRL) is not aligned on a fullword boundary.
The subschema does not contain the named procedure.
The procedure was improperly bound to location 0.
Not enough memory is available to load the database procedure dynamically.
An attempt to load a module from the load library or DDLDCLOD failed.
|
Copyright © 2014 CA.
All rights reserved.
|
|