Displaying Error Messages

At times, you may want to intentionally abend your task by issuing a WRITE LOG statement with a given severity code. To do this under a TCF, perform the following steps:
idmscu
At times, you may want to intentionally abend your task by issuing a WRITE LOG statement with a given severity code. To do this under a TCF, perform the following steps:
  1. Move the message number to UCE-MSG-CODE-02.
  2. Move -1 to UCE-RETURN-CODE-02.
  3. Issue a GET STORAGE statement to acquire the storage that is to contain the message text.
  4. Issue a WRITE LOG statement. Include the RETURN TEXT option and specify the previously acquired storage.
  5. Move the address of the message text into UCE-MSG-TEXT-POINTER-02.
    COBOL programs can do this by calling an Assembler subroutine.
  6. Issue a DC RETURN statement.
    This returns control to TCF and displays the error message on the TCF Error Message screen.