Hitachi

JP1 Version 11 JP1/Advanced Shell Description, User's Guide, Reference, and Operator's Guide 


5.8.7 Return codes of extended script commands and handling of errors

The table below lists and describes the return codes for the extended script commands. You can define these return codes by using the environment setting parameters.

Table 5‒40: Return codes of the extended script commands

Extended script commands

Execution result

Default value for return code

Environment setting parameter for specifying return codes

#-adsh_file

#-adsh_file_temp

#-adsh_job

#-adsh_job_stop

#-adsh_path_var

#-adsh_rc_ignore

#-adsh_spoolfile

#-adsh_step_start

#-adsh_step_error

Normal termination

0

ADSHCMD_RC_SUCCESS

Error termination

1

ADSHCMD_RC_ERROR

#-adsh_step_end

Job step normal termination

Return code of the last command executed in the job step normal block

--

Job step error termination

The job step was terminated by executing the exit command with arguments specified inside the job step error block.

Argument of the exit command

--

Error termination of #-adsh_step_end

1

ADSHCMD_RC_ERROR

#-adsh_script

Normal termination

Return code of the last command executed in the called external script

--

Error termination

1

ADSHCMD_RC_ERROR

Legend:

--: Not applicable

If execution of an extended script command results in error termination or job step error termination, the following occurs:

The following shows an execution example:

#-adsh_job EXCMD_ERROR
 
echo "Job start."
 
#-adsh_file ERRFILE file01 -chk exist  <-- This extended script command results in an error.
 
#-adsh_step_start STEP01 -run normal    <-- Do not execute a job step for which normal is specified in the run attribute.
  echo "command in step"
#-adsh_step_end
 
#-adsh_step_start STEP02 -run abnormal  <-- Execute a job step for which abnormal is specified in the run attribute.
  echo "command in step"
#-adsh_step_end
 
#-adsh_step_start STEP03 -run always    <-- Execute a job step for which always is specified in the run attribute.
  echo "command in step"
#-adsh_step_end
 
echo "Job end."                         <-- Do not execute any command outside the job step.