Return Codes
In a batch file, you can direct the processing that follows
the PR0CMND processing, using the return code in the following statement:
IF
ERRORLEVEL n GOTO x.
The following list explains the meaning of possible return codes:
- 0
- No errors.
- 4
- In all of the requests, the highest return code was Informational.
- 8
- In all of the requests, the highest return code was Warning.
- 12
- In all of the requests, the highest return code was Fatal.
- 16
- There was a syntax error on the command line. A pop-up window also displays, unless you specified Quiet+.
- 24
- Could not open the output file specified in the Output= parameter.
Since the return code value is evaluated as equal to or greater than, query each ERRORLEVEL in reverse order:
PR0CMND /R TYPE=EXTRACT REQUEST=identifier.name
IF ERRORLEVEL 24 GOTO Badout
IF ERRORLEVEL 16 GOTO Syntax
IF ERRORLEVEL 12 GOTO Fatal
IF ERRORLEVEL 8 GOTO Warning
IF ERRORLEVEL 4 GOTO Info
For example:
:Badout
echo The Output File could not be opened.
GOTO End
...
:End