The IDMS DC communications block replaces the IDMS DB communications block when the operating mode is either IDMS_DC or DC_BATCH. At runtime, the DC/UCF system uses the IDMS DC communications block to pass information about the outcome of requested data communications and database services to an application program.
Your program instructs the DML precompiler to copy the data description (called SUBSCHEMA_CTRL) of the IDMS DC communications block from the dictionary into program variable storage. You accomplish this by coding an INCLUDE IDMS (SUBSCHEMA_CTRL) statement in your program.
Note: For more information about INCLUDE IDMS, see INCLUDE IDMS.
You should examine the ERROR_STATUS field of the IDMS DC communications block after every call to the DBMS. Depending on the value contained in this field, you should perform the IDMS_STATUS routine.
Note: For more information, see ERROR_STATUS Field and Codes.
The following figure shows the layout of the 16-byte IDMS DC communications block.
┌────────────────────────────────────────┐ │ 16-byte IDMS DC communications block │ └────────────────────────────────────────┘ Length Suggested Field Data Type (bytes) Initial Value ┌──────────────┐ *│ 1 8 │ PROGRAM Alphanumeric 8 Program Name ├──────────┬───┘ │ 9 12 │ ERROR_STATUS Alphanumeric 4 '1400' ├──────────┤ │ 13 16 │ DBKEY Binary 4 (Fullword) 0000 ├──────────┴───────┐ │ 17 32 │RECORD_NAME Alphanumeric 16 Spaces ├──────────────────┤ │ 33 48 │AREA_NAME Alphanumeric 16 Spaces ├──────────────────┤ │ 49 64 │ERROR_SET Alphanumeric 16 Spaces ├──────────────────┤ │ 65 80 │ERROR_RECORD Alphanumeric 16 Spaces ├──────────────────┤ │ 81 96 │ERROR_AREA Alphanumeric 16 Spaces ├──────────────────┘ **│ 97 100 │ PAGE_INFO Binary 4 (Fullword) 0000 └──────────┘ ┌──────────┬──┬────┐ │ 97 │..│196 │IDBMSCOM_AREA Alphanumeric 100 Spaces ├────────┬─┘ └────┘ │ 197 200│ DIRECT_DBKEY Binary 4 0000 ├────────┴─┐ ┌────┐ │ 201 │. │300 │DCBMSCOM_AREA Alphanumeric 100 Spaces ├─────────┬┘ └────┘ │ 301 304 │ SSC_ERRSTAT_SAVE Alphanumeric 4 Spaces ├─────────┤ │ 305 308 │ SSC_DMLSEQ_SAVE Binary 4 (Fullword) 0000 ├─────────┤ │ 309 312 │ DML_SEQUENCE Binary 4 (Fullword) 0000 ├─────────┤ │ 313 316 │ RECORD_OCCUR Binary 4 (Fullword) 0000 ├─────────┤ │ 317 320 │ SUBSCHEMA_CTRL_END Alphanumeric 4 Spaces └─────────┘
* word aligned ** PAGE_INFO_GROUP overlays bytes 97 and 98 and PAGE_INFO_DBK_FORMAT overlays bytes 99 and 100. Both of these fields are binary datatype each having a length of two bytes. Suggested initial values for both are 00. Together these two fields represent PAGE_INFO.
Note: For more information about the 18-byte IDMS DC communications block, see 18-Byte Communications Blocks
The IDMS DC communications block contains the following fields:
Contains your application program's name. If you code an INCLUDE IDMS(SUBSCHEMA_BINDS) statement in your program, the DML precompiler initializes this field automatically. If you do not include this statement in your program, you must initialize the field.
Contains a value indicating the outcome of the last DML statement executed. The DML precompiler initializes the ERROR_STATUS field to 1400. The DC/UCF system updates this field after a requested database or data communications service call and before returning control to your program. The DC/UCF system updates this field whether or not the request was processed successfully.
If your program consists of more than one run unit, it must reinitialize the ERROR_STATUS field to 1400 after finishing one run unit and before binding to the next.
Note: For more information about the ERROR_STATUS field and its use, see ERROR_STATUS Field and Codes.
Contains the database key of the last record accessed by the run unit. For example, after successful execution of a FIND command, the DBMS updates DBKEY with the database key of the located record. If the database call results in an error condition, DBKEY remains unchanged.
Contains the name of the last record accessed successfully by the run unit. This field is left justified and padded with spaces on the right.
Contains the name of the last area accessed successfully by the run unit. This field is left justified and padded with spaces on the right.
Contains the name of the set involved in the last operation to produce an error condition. This field is left justified and padded with spaces on the right.
Contains the name of the record involved in the last operation to produce an error condition. This field is left justified and padded with spaces on the right.
Contains the name of the area involved in the last operation to produce an error condition. This field is left justified and padded with spaces on the right.
Used internally by the DBMS for specification of runtime information.
Two binary halfwords that represent the page information associated with the last record accessed by the run unit. PAGE_INFO is not changed if the call to the DBMS results in a non-zero status. The first halfword (PAGE_INFO_GROUP) represents the page group number. The second halfword (PAGE_INFO_DBK_FORMAT) represents the db-key radix.
The db-key radix portion of the page information can be used in interpreting a db-key for display purposes and in formatting a db-key from page and line numbers. The db-key radix represents the number of bits within a db-key value that are reserved for the line number of a record. By default, this value is 8, meaning that up to 255 records can be stored on a single page of the area. Given a db-key, you can separate its associated page number by dividing the db-key by 2 raised to the power of the db-key radix. For example, if the db-key radix is 4, you would divide the db-key value by 2**4. The resulting value is the page number of the db-key. To separate the line number, you would multiply the page number by 2 raised to the power of the db-key radix and subtract this value from the db-key value. The result would be the line number of the db-key. The following two formulas can be used to calculate the page and line numbers from a db-key value:
Page-number = db-key value / (2 ** db-key radix)
Line-number = db-key value - (page-number * ( 2 ** db-key radix))
Contains either a user-specified db-key value or a null db-key value of -1. This field is used to store records with a location mode of DIRECT. Because the DC/UCF does not update this field, you must initialize DIRECT_DBKEY.
A note for native VSAM users: use the DIRECT_DBKEY field only when storing a record in a native VSAM relative record dataset (RRDS). You must initialize DIRECT_DBKEY to the relative record number of the record being stored.
Used internally by the DC/UCF system for specification of runtime function information.
Used by the IDMS_STATUS routine to save a nonzero ERROR_STATUS in the event of an abend.
Used by the IDMS_STATUS routine to save the value of DML_SEQUENCE in the event of an abend.
Contains the source-level sequence number generated by the DML precompiler. The DML precompiler updates this field before each call to the system if you specify DEBUG in the DECLARE SUBSCHEMA statement. The runtime system does not use this field.
Contains a record occurrence sequence identifier used internally by the system.
Marks the end of the IDMS DC communications block.
|
Copyright © 2014 CA.
All rights reserved.
|
|