ibm:vm370-lib:cmshelp:error.helpexc
ERROR
EXEC Interpreter
- error.helpexc.txt
&ERROR STATEMENT EXEC statement Use the &ERROR control statement to specify the action to be taken when a CMS command results in an error and returns with a nonzero return code. Put the &ERROR statement prior to the command where the action will be required. The format of the &ERROR control statement is: +-----------+-----------------------------------------------------------------+ | &ERROR | [&CONTINUE|executable statement] | +-----------+-----------------------------------------------------------------+ where: executable-statement specifies any executable statement, which may be an EXEC control statement or assignment statement or a CMS command. If you specify an EXEC control statement that transfers control to another line in the EXEC, execution continues at the specified line. Otherwise, execution continues with the line following the CMS command line that caused the error. &CONTINUE If your EXEC does not contain an &ERROR control statement, then the default is &CONTINUE; that is, EXEC processing is to continue with the line following the CMS command that caused the error. You can use &ERROR &CONTINUE to reset a previous &ERROR statement. Usage Notes: 1. The words following an &ERROR control statement are not scanned until a CMS command returns a nonzero return code. Therefore, if you specify an invalid EXEC statement, the error is not detected until a CMS command failure triggers the &ERROR statement. If the &ERROR statement executes a CMS command that also results in an error, EXEC processing is terminated.
ibm/vm370-lib/cmshelp/error.helpexc.txt ยท Last modified: 2023/08/06 13:36 by Site Administrator