Previous Topic: Field DescriptionsNext Topic: Major DB Status Codes


ERRSTAT Field and Codes

You can use the ERRSTAT field of the IDMS communications block to determine if a DML request was processed successfully. The DBMS system returns a value to the ERRSTAT field indicating the result of each DML request. For more information about the ERRSTAT field, see Testing for DML Error-Status Codes.

LRF users: You should check the LR-STATUS field of the LRC block before checking the ERRSTAT field.

Major and Minor Codes

The ERRSTAT field is a four-byte zoned decimal field. The first two bytes represent a major code; the second two bytes represent a minor code. Major codes identify the function performed; minor codes describe the status of that function.

Value of Codes

A value of 0000 indicates successful completion of the requested function. A value other than 0000 indicates completion of the function in a manner that may or may not be in error, depending on your expectations. For example, 0326 (DB-REC-NOT-FOUND) should be anticipated after FIND CALC retrieval; this allows you to trap the condition and continue processing.

DB status codes have a major code in the range 01 to 20. They occur during database access in batch or online processing. DC status codes have a major code in the range 30 to 51. They occur in online or DC-BATCH processing. Status codes with a major code of 00 apply to all DML functions. DB status codes and DC status codes are discussed separately below.

DB Status Codes

The following tables list DB major and minor codes and their meanings.