Previous Topic: MOVE (Format II)

Next Topic: READ

ON-DB-ERROR

This option provides the capability to test a specific low level

CA-DATACOM/DB error return code and take appropriate action.

This command must be coded as part of a database command and only needs to be used to bypass the normal error handling of CA -Datamacs/IICA-Datamacs/II.

ON-DB-ERROR {EQ|GT|LT|NE} {'db-error-code'| DUPLICATE} GO TO {paragraph-name | GOBACK | FINISH} 
Logical Operators
EQ

equal

GT

greater than or equal to

LT

less than or equal to

NE

not equal

If the logical operator is not coded, then EQ will be assumed.

Database error return code

Any valid 2-digit CA-DATACOM/DB return code enclosed in quotes.

DUPLICATE may be used in place of return code '10'.

Error Handling

All database error return codes will cause CA-Datamacs/II to terminate after printing appropriate error messages, except;

A duplicate master key on CREATE/LOAD will be bypassed, with a message. The AT-END will be activated if the key value found exceeds key values specified (14), or the end of the table/area (19). The NOT-FOUND will be activated by a return code 14. The user can then take appropriate action by specifying a GO TO option. Be aware, if coded, the NOT-FOUND and AT-END options will be triggered first.

Based on what CA-Datamacs/II considers a normal circumstance, it is highly unlikely that the regular use of this option will be necessary.