Job Management Partner 1/Automatic Job Management System 3 Command Reference 1

[Contents][Glossary][Index][Back][Next]


jp1exit (Windows only)

Format

jp1exit
     [-ec abnormal-end-code]

Description

After the return code of the program (command) executed by the jp1exec command has been saved, the jp1exit command is used to acquire the return code.

Execution privileges

None

Arguments

-ec abnormal-end-code

Specify the return code to be returned if an internal error of the jp1exit command occurs.

You can specify 0 to 9,999.

If this option is omitted, 172 is set as the return code returned by the jp1exit command when an error occurs.

If an invalid value is specified, 172 is used as the return code of the jp1exit command. The details of the error are output to the standard error output.

Notes

Example

The following example checks the end code of the executed program to branch subsequent processing:

 
jp1exec  UAP1.exe
jp1exit
if %ERRORLEVEL% =0  GOTO :next1
 
Error handling
GOTO :end
 
:next1
jp1exec UAP2.exe
jp1exit
if %ERRORLEVEL% =0  GOTO :next2
 
Error handling
GOTO :end
 
:next2
jp1exec UAP3.exe
jp1exit
if %ERRORLEVEL% =0  GOTO :next3
 
Error handling
GOTO :end
 

Explanation:
When the last jp1exit command is executed, the return code of the program executed by the paired jp1exec command becomes the return code of the batch file.
If an error occurs and processing branches to :end, the return code of the last program executed after the corresponding error handling becomes the return code of the batch file.

[Contents][Back][Next]


[Trademarks]

Copyright (C) 2009, 2010, Hitachi, Ltd.
Copyright (C) 2009, 2010, Hitachi Solutions, Ltd.