SAP – Standalone Error Handling
This command determines at what line a program will restart after an error is cleared. When an error occurs in a standalone program, it will automatically jump to subroutine 31. Typically, the user will establish an error-handling routine to cancel the error. The SAP command indicates where the program should return – either jump back to the first line in the program or return to the line following where the error occurred.
Applies to: CMD-4CR, CMD-4EX-SA, PMX-4EX-SA, PMX-4ET-SA, PMX-2ED-SA, PMX-2EX-SA
ASCII SAP
Syntax:
Read:
SAP
Write:
SAP=[mode]
Where: [mode] specifies which line to return to in the program after the error is cleared: 0: Continue from the next line where the error occurred 1: Continue from the first line of the program |
Reply:
Command is accepted and executed
Read:
Returns the setting of the command (0-1)
Write:
OK
Command cannot be processed
An error message is returned. See Error Codes
Example:
Read:
SAP * Returns the setting of return line on error clear; 0, or 1
Write:
SAP=1 * After the error is cleared, return to the first line of the program.
Notes:
- None
See also:
SACTRL, SASTAT, SLOAD, V, GS, SPC