The BIND RECORD statement establishes addressability for a record in program variable storage. In most cases, you do not have to issue individual BIND RECORD statements, since the INCLUDE IDMS SUBSCHEMA_BINDS statement generates the necessary statements as a group. (see DML Precompiler-Directive Statements). Nevertheless, you can issue BIND RECORD commands separately as necessary (for Example, to bind several records to the same storage location). In any case, you must establish addressability for each subschema record used by your program.
After each BIND RECORD statement, your program should perform the IDMS_STATUS routine to ensure that the statement executed successfully.
►►─── BIND RECORD (record-name) ─┬────────────────────────┬─ ; ───────────────►◄ └─ TO (record-location) ─┘
Names the record bound to a location in variable storage. The location corresponds to the record description copied into the program. Record-name must specify a record included in the subschema.
Optionally allows you to bind the record to a specific location. The data defined in record-location must be identical in length to the data defined in record-name.
Note: Be careful when using the TO (record-location) option. Source-object mismapping can result from improper use. If your program contains more than one copy of a given database record description, you must be sure to bind the proper record description at the proper time.
The following statement binds the EMPLOYEE record:
BIND RECORD (EMPLOYEE);
Upon completion of the BIND RECORD 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 RECORD 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 record. Your program probably invoked the wrong subschema.
The record was improperly bound to location 0.
Insufficient memory is available to load a database procedure dynamically.
An attempt to load a module from the load library or DDLDCLOD failed.
|
Copyright © 2014 CA.
All rights reserved.
|
|