Technical data
DISCONNECT
member are ignored. The current record of the run unit is removed from each
remaining set type.
8. If the set type currency indicator for a disconnected set pointed to the current
record, that currency indicator now points to the position in the set vacated
by the record. All other currency indicators are not affected.
9. If the execution of a DISCONNECT statement results in a database exception
condition, no changes are made to the membership of the current record in
the database.
10. If a database exception condition occurs during the execution of a
DISCONNECT statement, the DBCS places a database exception condition
code in the special register DB-CONDITION (see Technical Notes). This code
identifies the condition.
Technical Notes
DISCONNECT statement execution can result in these DB-CONDITION
database exception condition codes:
DBM$_NOT_OPTNL The current record of the run unit is not an
OPTIONAL member of set-name.
DBM$_CRUN_NULL The currency indicator for the current record of the run
unit is null.
DBM$_CRUN_POS The currency indicator for the current record of the
run unit specifies the position of a vacated record in a
record collection.
DBM$_WRONGRTYP The record type of record-name is not the same as the
current record’s type.
DBM$_NOT_MTYP The current record is not a member record type of
set-name.
DBM$_NOT_MBR The current record is not a member of set-name.
DBM$_NOT_UPDATE A realm is not in ready update usage mode.
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
• USE statement
Examples
DISCONNECT EMPLOYEE FROM CONSISTS_OF.
DISCONNECT EMPLOYEE FROM ALL.
DISCONNECT FROM ALL.
DISCONNECT FROM CONSISTS_OF.
Procedure Division 4–27