Previous Topic: Communications BlocksNext Topic: Layout of the IDMS DB Communications Block


IDMS DB Communications Block

Your program uses the IDMS DB communications block when the operating mode is BATCH. This communications block serves as an interface between the database management system (DBMS) and your application program. Whenever a run unit issues a call to the DBMS for a database operation, the DBMS returns information about the outcome of the requested service to your program's IDMS DB communications block.

Your program instructs the DML precompiler to copy the data description (called SUBSCHEMA_CTRL) of the IDMS DB communications block from the data dictionary into program variable storage. You accomplish this by coding an INCLUDE IDMS (SUBSCHEMA_CTRL) statement in your program.

Note: For more information on INCLUDE IDMS, see INCLUDE IDMS.

You should examine the ERROR_STATUS field of the IDMS DB communications block after every call to the DBMS. Depending on the value contained in this field, you should perform the IDMS_STATUS routine. For more information, see ERROR_STATUS Field and Codes, later in this chapter. For Example, if the ERROR_STATUS field contains the value 0307 while walking a set, your program should perform end-of-set processing. Otherwise, your program should perform the IDMS_STATUS routine.