9.5.6 #-adsh_rc_ignore command (defines commands to always terminate normally)
Syntax
#-adsh_rc_ignore command-name[,command-name ...]
Description
This command specifies commands that are always to terminate normally, regardless of the return code. The return code set by such a command will not be used to evaluate the success or failure of the job step. A maximum of 1,023 #-adsh_rc_ignore commands can be used to define commands that are to always terminate normally.
Note that if a specified command receives a signal and terminates, its termination will still be an error termination, regardless of this specification. For details about the definition method, see (2) Defining commands that always terminate normally.
During execution of a job definition script, this command becomes applicable at the location where it is specified. If this command is specified outside of a job step, its definitions are applicable throughout the entire job definition script. If this command is specified within a job step, its definitions are applicable within that job step only, beginning at the point where it is specified through termination of the job step, during which period definitions specified outside the job step are disabled (however, before the point where it is specified within the job step, the definitions specified outside the job step are in effect).
Arguments
- command-name [,command-name ...]
Specifies the commands that are to be defined to always terminate normally.
You can specify a maximum of 255 command names delimited by the comma (,).
command-name
Windows: ~<path name>((1 to 247 bytes))
UNIX: ~<path name>((1 to 256 bytes))
Specifies a command's base name.
Return codes
Return code |
Meaning |
---|---|
0 |
Normal termination |
1 |
Error termination |
Notes
A command must be specified by its base name. Do not use aliases or links within an applicable job step, because the names you use in the applicable job steps must match the base names you used to define the commands in the #-adsh_rc_ignore command.
A maximum of 1,023 #-adsh_rc_ignore commands can be specified in a job definition script file.
This command cannot be applied to an extended script command. The return code from an extended script command is always 0 for normal termination and 1 for error termination, and the job cannot continue when it terminates with an error.
This command cannot be specified in a job step error block.
When a batch job is interrupted and the KNAX6584-I message is output, the specification of this command will not have been applied to the command that executed last.
If a command that is specified in the #-adsh_rc_ignore command will be executed in the format described in 5.1.7 Execution as a separate process, you must specify in the #-adsh_rc_ignore command the base name of the applicable command before character string substitutions have been applied.
-
If you specify FUNCTION for the CMDRC_CMDGRP_CHECK parameter, the function can always be terminated normally by specifying the function name for the command name for argument. When the CMDRC_CMDGRP_CHECK parameter is not specified or NONE is specified for the CMDRC_CMDGRP_CHECK parameter, the parameter is processed as the command name having the same name even when the function name is specified for the command name of the argument.
Example
Ignore the grep command's return code.
#-adsh_step_start STEP1 #-adsh_rc_ignore grep UAP data|grep "TOTAL:" #-adsh_step_end