Technical data
MODIFY
DBM$_DUPNOTALL A sort key data item is modified creating a duplicate
value in a DUPLICATES NOT ALLOWED set.
DBM$_NOT_UPDATE A realm is not in ready update usage mode.
DBM$_CHKITEM A modified data item failed to pass the schema CHECK
ITEM condition.
DBM$_CHKMEMBER A modified data item failed to pass the schema CHECK
MEMBER condition.
DBM$_CHKRECORD A modified data item failed to pass the schema CHECK
RECORD condition.
DBM$_CONVERR A data conversion error occurred in the MODIFY
operation.
DBM$_ILLNCHAR An invalid character was found in a numeric field.
DBM$_NONDIGIT A nonnumeric character was found in a numeric field.
DBM$_OVERFLOW A data overflow error occurred in the MODIFY
operation.
DBM$_TRUNCATION A data truncation error occurred in the MODIFY
operation.
DBM$_UNDERFLOW A data underflow error occurred in the MODIFY
operation.
Additional References
• Section 2.2, on reserved words (database special registers)
• HP COBOL Reference Manual, Chapter 6, section on scope of statements
• Section 4.8.1, on database On Error condition
• Section 5.14.1, on RETAINING clause
• USE statement
Examples
1. This example modifies an entire database record. It is a partial update
routine. Except for the PART_ID number in PARTS, the set was originally
created with empty parts records. As new information for a part is made
available, it is included in the record.
150-UPDATE-PARTS-RECORD.
DISPLAY "ENTER A PART-ID NUMBER - X(8): "
WITHOUT ADVANCING.
ACCEPT PART_ID.
IF PART_ID NOT = "TERMINAL"
FIND FIRST PART WITHIN ALL_PART USING PART_ID
ON ERROR DISPLAY "ERROR IN FIND "
PERFORM 200-PARTS-RECORD-ERROR
GO TO 150-UPDATE-PARTS-RECORD
END-FIND
PERFORM VERIFY-PART-ROUTINE
ELSE
PERFORM TERMINAL-ROUTINE.
Procedure Division 4–47