Application programs that access the database require the DECLARE SUBSCHEMA statement. This statement:
►►─── DECLARE ────────────────────────────────────────────────────────────────► ►─┬──────────────────────────────────────────────────────────────────────────► └─ (subschema-name SUBSCHEMA, schema-name SCHEMA ────────────────────────── ►────────────────────────────────────────────────────────────────────────────► ─┬───────────────────────────┬────────────────────────────────────────────── └─ VERSION version-number ──┘ ─►─────────────────────────────────────────────────────────────────┬──────────► ─┬───────────────────────────────────────────────────────┬── ) ──┘ └─ , program-name PROGRAM ─┬──────────────────────────┬─┘ └─ VERSION version-number ─┘ ►─┬─────────────────────────────┬────────────────────────────────────────────► └─ MODE ( ─┬─ BATCH ◄ ──┬─ ) ─┘ ├─ IDMS_DC ──┤ ├─ DC_BATCH ─┤ └─ mode ─────┘ ►─┬─────────┬────────────────────────────────────────────────────────────────► └─ DEBUG ─┘ ►─┬─────────────────────────────────────────┬─ ; ────────────────────────────►◄ └─ SUBSCHEMA_NAMES LENGTH ( ─┬─ 16 ─┬─ ) ─┘ └─ 18 ─┘
Specifies the subschema and schema view of the database used by your program. The subschema and schema definitions must already exist in the data dictionary. If your DBA preregisters program names valid for the subschema in the data dictionary, the program name that you specify in the program-name parameter (described below) must be associated with this subschema in the dictionary.
Optionally qualifies schema-name with a version number. Version-number must be an integer in the range 1 through 9999. The default is the highest version number defined in the data dictionary for schema-name.
Optionally specifies the name of your program. If you preregistered this program in the data dictionary, make sure that program-name matches the name in the data dictionary. Otherwise, the DML precompiler will not recognize the program.
Optionally qualifies program-name with a version number (for example, for purposes of testing or development). version-number must be an integer in the range 1 through 9999. Version-number defaults to the highest number defined in the data dictionary for the program, or defaults to 1 if the program is not registered in the dictionary.
Identifies the operating mode used by the DML precompiler to generate call statements for the program's DML statements.
Specifies that your program executes in batch mode. The DBMS copies the IDMS DB communications block into program variable storage and generates standard CALL sequences. BATCH is the default.
Specifies that your program executes in IDMS_DC mode. The DBMS copies the IDMS DC communications block into program variable storage and generates CA IDMS/DC CALL sequences for CA IDMS/DC requests.
Specifies that your program executes in DC-BATCH mode. The DBMS copies the IDMS DC communications block into program variable storage and generates DC_BATCH CALL sequences for CA IDMS/DC requests.
DC_BATCH allows you to use all of the database DML commands, and also the following CA IDMS/DC DML commands:
You specify MODE DC_BATCH to access CA IDMS/DC queues and printers from batch applications running under the DC/UCF system.
Indicates that your program executes in a special environment, determined by the database administrator. Special environments include user-defined operating modes and teleprocessing monitors. The DML precompiler copies the appropriate communications block into program variable storage and generates operating-mode-specific CALL sequences.
Acceptable values for mode are:
Instructs the DML precompiler to place a unique DML sequence number in the IDMS communications block for each DML statement. These numbers appear in columns 82 through 89 of the PL/I compiler output listing, in the form DMLPnnnn. The DML precompiler generates numbers to identify the sequence in which DML statements appear in the program. Depending on the error routine defined by the DBA, you can use the DML sequence number to help debug your program.
If you do not specify DEBUG, the DML precompiler does not associate sequence numbers with source statements.
Specifies either 16 bytes or 18 bytes for the following fields in the IDMS communications block: RECORD_NAME, AREA_NAME, ERROR_SET, ERROR_RECORD, and ERROR_AREA.
The following example illustrates how to use the DECLARE SUBSCHEMA statement. In this Example, DECLARE SUBSCHEMA accesses the EMPSS09 subschema of the EMPSCH schema for a program named PLITST. The program runs under the IDMS_DC operating mode and includes DEBUG sequencing.
DECLARE (EMPSS09 SUBSCHEMA,EMPSCHM SCHEMA,PLITST PROGRAM)
MODE (IDMS_DC)
DEBUG;
|
Copyright © 2014 CA.
All rights reserved.
|
|