Hitachi

JP1 Version 11 JP1/Script Description and Reference (For Windows Systems)


6.1.12 JP1/Script exit codes

At script execution, the value set in the Exit or ExitWindows command is usually returned as the exit code. If you did not use these commands or omitted the command argument, 0 is returned as the exit code. However, if script execution results in an error, a JP1/Script exit code may be returned.

Table 6-5 shows the values of exit codes set in the following registry:

HKEY_LOCAL_MACHINE\SOFTWARE\Hitachi\JP1/Script\SPTX\ExitCode
Table 6‒5: Exit codes set in the registry

Value name

Default

Meaning

AlreadyRun

16

The specified script file has already started.

Terminate

17

The JP1/Script process was forcibly terminated.

TimeOut

18

The JP1/Script process was terminated because the timeout interval elapsed.

GrammarError

19

A syntax error occurred.

ExAbortError

20

An error canceled the JP1/Script process. (Possible errors include memory shortage, reference to an undefined variable, nonexistent procedure, and statement error.)

Error

99

An error occurred before the JP1/Script process started. (For example, the specified script file was not found.)

--

21 to 32

Reserved for future use.

Important note

Be careful not to specify a JP1/Script exit code in the Exit command or ExitWindows command.

For example, if you specify exit code 19 (the default of the GrammarError value in the registry in Table 6-5) in these commands, the following message will be output to the event log even if the script execution terminates normally: Script execution has finished. Syntax error occurred. (script-file-name).