Hitachi

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


9.4.3 adshcmdrc command (defining the return code threshold of a command)

Syntax

adshcmdrc command-name threshold

Description

To treat the command as having ended normally despite the return code of the command executed from the job definition script being other than 0, define the value consisting of the target command name and threshold. Accordingly, cases when the return code of the command is not greater than the threshold value will be interpreted as the command having ended normally. If the command that is specified for the argument finishes by receiving a signal, the command specified for the argument ends in an error. You can specify a maximum of 4095 adshcmdrc commands.

The effective range of the definition of this command is as follows:

Arguments

command-name ~ <Command name> ((1 to 255 bytes))

This command specifies the command name that defines the return code to be treated as normal termination. In Windows, you can specify the command name with an extension. You cannot specify the command path. Types of commands that can be specified are as follows: Other commands become targeted if other processes have been executed (using pipe, command substitution, |&, or &).

  • External commands

  • UNIX-compatible commands

  • Shell operation commands

  • Scripts that have been executed as a command (executed with #!)

  • Child jobs

  • Functions (only if FUNCTION is specified for the operand of the CMDRC_CMDGRP_CHECK parameter)

If the extension of the command name is omitted in Windows, the command and batch file having the same name as the specified name become subject to control of the threshold regardless of extension. If you specify a command that includes a space in Windows, enclose the command with " (double quotation marks).

threshold ~ <integer> ((-1 to 255))

Defines the threshold value that is treated as a normal termination in the return code. If the return code is larger than the threshold value specified here, the command is considered to have been terminated with an error.

If -1 is specified, the result is always terminated with an error.

If 255 is specified, the result is always normally terminated.

Return codes

Return code

Meaning

0

Normal termination

1

Termination with an error

Notes

Examples

Defines the threshold value of the return code that UAP considers as being normally terminated. In the following example, if UAP finishes in job step 1 with a return code that is 1 or less, UAP treats this as having terminated normally.

#-adsh_step_start STEP1
  adshcmdrc UAP 1
  UAP data
#-adsh_step_end