Previous Topic: DML Statements (Data Communications)Next Topic: ACCEPT (DC/UCF)


ABEND (DC/UCF)

The ABEND statement terminates the issuing task abnormally. Optionally, ABEND also writes a task dump to the log file. Upon completion of the ABEND function, the DBMS returns processing control to the DC/UCF system program-control module.

Syntax
►►─── ABEND CODE (abend-code) ─┬────────────┬─ ; ─────────────────────────────►◄
                               ├─ NODUMP ◄ ─┤
                               └─ DUMP ─────┘
Parameters
ABEND CODE(abend-code)

Specifies a 4-character abend code that you select. Abend-code can be the symbolic name of a variable storage field containing the abend code, or the code itself enclosed in single quotation marks.

Note: Because the abend code that you specify appears in the system log and displays at the task's terminal, you should not use system abend codes.

NODUMP/DUMP

Specifies whether the system writes a formatted task dump to the log file. The default is NODUMP.

Example

In this example, ABEND terminates the issuing task abnormally, issuing the code U876, and writes a task dump to the log file:

ABEND CODE('U876')
  DUMP;
Status Codes

Because the DBMS passes control to the system program-control module, your program does not have to check the ERROR_STATUS field.