The BIND RUN_UNIT statement:
BIND RUN_UNIT must be the first functional DML call passed to the DBMS at execution time. BIND RUN_UNIT must logically precede all other DML statements (for example, BIND RECORD, READY, FIND) in your program.
If you use the INCLUDE IDMS SUBSCHEMA_BINDS statement (see DML Precompiler-Directive Statements) in your program, you do not need the BIND RUN_UNIT statement. INCLUDE IDMS SUBSCHEMA_BINDS automatically invokes the necessary binds.
Program Registration
Some sites require program registration, that is, they require all programs to be registered in the dictionary before compilation. If your site requires program registration, your program must initialize the PROGRAM_NAME field of the IDMS communications block either automatically or manually:
A PL/I assignment statement automatically generated by INCLUDE IDMS SUBSCHEMA_BINDS moves the program name to the PROGRAM_NAME field.
You code a PL/I assignment statement prior to the BIND RUN_UNIT statement. For Example:
PROGRAM_NAME = 'EMPDISP';
You can use the BIND RUN_UNIT statement in both the navigational and Logical Record Facility (LRF) environments.
►►─── BIND RUN_UNIT ─┬──────────────────────────────┬─────────────────────────► └─ SUBSCHEMA (subschema-name) ─┘ ►─┬─────────────────────────────┬────────────────────────────────────────────► └─┬─ DBNODE ───┬─ (nodename) ─┘ └─ NODENAME ─┘ ►─┬──────────────────────────┬─┬───────────────────────┬─────────────────────► └─ DBNAME (database-name) ─┘ └─ DICTNODE (nodename) ─┘ ►─┬──────────────────────────────┬─ ; ───────────────────────────────────────►◄ └─ DICTNAME (dictionary-name) ─┘
Identifies a subschema view other than that specified in the DECLARE SUBSCHEMA statement. Subschema-name must be the 1- to 8-character name of a subschema.
Note: You should use the SUBSCHEMA subschema-name option carefully. Improper use can lead to mismapping between the named subschema and record descriptions in variable storage.
Specifies the node where the database resides. Nodename is either the symbolic name of a user-defined 8-character field in variable storage or the node name itself, enclosed in single quotation marks. The keywords DBNODE and NODENAME are synonymous.
Names the database to be accessed by the run unit. Database-name is either the symbolic name of a user-defined 8-character field in variable storage, or the database name itself enclosed in single quotation marks.
Names the node that controls the data dictionary where the subschema resides. Nodename is either the symbolic name of a user-defined 8-character field in variable storage, or the nodename itself enclosed in single quotation marks.
Names the dictionary where the subschema resides. Dictionary-name is either the symbolic name of a user-defined 8-character field in variable storage, or the dictionary name itself enclosed in single quotation marks.
Note: Specifying DBNODE, DBNAME, DICTNODE, and DICTNAME as BIND RUN_UNIT parameters overrides any corresponding parameters set using the system DCUF SET statement (online) or the SYSIDMS job stream parameters (batch).
More information:
The following example illustrates how a batch program accesses a subschema, EMPSS01, stored in dictionary PRODICT1 at node DEVT. The run unit accesses database PRODDB1 at the same node.
BIND RUN_UNIT SUBSCHEMA (EMPSS01) NODENAME (DEVT) DBNAME (PRODDB1) DICTNODE (DEVT) DICTNAME (PRODICT1);
Upon completion of the BIND RUN_UNIT 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 RUN_UNIT statement. This code usually indicates that the IDMS DB communications block (SUBSCHEMA_CTRL) is not aligned on a fullword boundary.
The transaction manager encountered an error. See the log for additional information.
The subschema invoked does not match the subschema object tables.
The run unit is not bound to the DBMS. This code indicates that the central version is not active, that the central version is not accepting new run units, or that the run unit's connection to the central version is broken due to timeout or other factors, as noted on the CV log.
A journal file will not open (local mode only); the most probable cause is that the JCL doesn't correctly specify the journal file.
The available memory is insufficient to load a subschema or database procedure dynamically.
The central version is not accepting new run units.
The subschema was not found in the dictionary load area or in the load library.
The run unit was already bound.
The node specified in the DBNODE clause is not active or was disabled from the system generation configuration.
IDMS does not know the database specified in the DBNAME clause.
The named subschema is not valid under the database specified in the DBNAME clause.
The available memory is insufficient to allocate native VSAM work areas.
|
Copyright © 2014 CA.
All rights reserved.
|
|