TSM
Termination Status Message
This system variable returns information on the status of error and escape processing within the current task.
Syntax
Section titled “Syntax”TSMRemarks
Section titled “Remarks”The returned string is 32 bytes and normally contains 32 spaces. This variable is set only after a carriage return is used to respond to a PROGRAM EXCEPTION ENCOUNTERED message or an E and a carriage return is used to respond to an ESCAPE REQUESTED message when error processing is specified in the IPL file. It may then be used to send parameters to an error-processing program. For more information, please refer to the chapter on System Files in the Thoroughbred Basic Customization and Tuning Guide.
This variable provides 32 bytes of information in the following format:
Byte(s)- Description
1- Status Code
0 = ERROR 1 = ESCAPE
2 - 9- Program name, left-justified
10 - 17- Undefined
18 - 22- Program line number of statement being processed at error or escape condition
23 - 27- Thoroughbred Basic Error Code
28 - 32- Operating System Error Code
Examples
Section titled “Examples”LET X$ = TSMPRINT X$ (1,9)If the program prints the value “1INDEX”, the current program being processed (INDEX) was terminated with an Escape.
See also
Section titled “See also”TCB function
From the Thoroughbred Basic Language Reference, Volume III: R–Z, version 8.9.1. Open this page in the PDF