The BIND record function establishes addressability to the areas in variable storage that hold or will hold record data. When a record is retrieved from the database, its content is placed into the area to which its record type is bound. Conversely, when a record is stored into the database, the DBMS uses the values that the application has placed into this same area as the record's content. The program allocates the storage areas and then informs the DBMS of their location using the BIND record function.
Suppose, for example, that a program is written to list the departments and employees at Commonweather. As shown in the following figure, the program reserves variable storage for the DEPARTMENT and EMPLOYEE record types and the IDMS Communications block.
Each record accessed by a program must be bound to some area in variable storage.
Copyright © 2013 CA.
All rights reserved.
|
|