

Running a Program Under TCF › Displaying Error Messages
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:
- Move the message number to UCE-MSG-CODE-02.
- Move -1 to UCE-RETURN-CODE-02.
- Issue a GET STORAGE statement to acquire the storage that is to contain the message text.
- Issue a WRITE LOG statement. Include the RETURN TEXT option and specify the previously acquired storage.
- Move the address of the message text into UCE-MSG-TEXT-POINTER-02.
Note: COBOL programs can do this by calling an Assembler subroutine.
- Issue a DC RETURN statement.
This returns control to TCF and displays the error message on the TCF Error Message screen.
Copyright © 2013 CA.
All rights reserved.
 
|
|