Termination code
If you want to use a reference to a termination code in your batch file, perform the following actions:
- To use such a reference in a Windows batch file, write %errorlevel% in the batch file.
- To use such a reference in a UNIX Bourne shell script, write $? in the shell script.
- To use such a reference in a UNIX C shell script, write $status in the shell script.
A reference to a termination code is used in the following example of a Windows batch file. If this batch file runs and Export Tool returns the termination code 1 or 3, the command prompt displays a message that indicates the set subcommand fails.
java -classpath "./lib/JSanExportLoader.jar" -Del.tool.Xmx=536870912 -Dmd.command=command.txt -Dmd.logpath=log sanproject.getexptool.RJElMain<CR+LF> if %errorlevel%==1 echo THE SET SUBCOMMAND FAILED<CR+LF> if %errorlevel%==3 echo THE SET SUBCOMMAND FAILED<CR+LF> pause<CR+LF>
In the previous script, <CR+LF> indicates the end of a command line.
