Hitachi

Job Management Partner 1 Version 10 Job Management Partner 1/Advanced Shell Description, User's Guide, Reference, and Operator's Guide


adshfile command (specifies the allocation and postprocessing of regular files)

Organization of this page

Format

adshfile  [-s {step|job}] [-n {del|keep}] [-a {del|keep}]
          [-c {exist|no}] file-path-name

Description

This shell operation command allocates a regular file, checks whether the regular file already exists, and specifies postprocessing. The command takes effect when it is specified in a job definition script executed by JP1/Advanced Shell's job controller. You can specify a maximum of 64 regular files to be allocated.

For details about the allocation and postprocessing of regular files and the difference from the #-adsh_file command, see 5.9.1 Allocating regular files and performing postprocessing.

Regular files allocated with this command are managed separately from regular files allocated with the #-adsh_file command. Postprocessing is performed on the regular files allocated by the adshfile command first and then on the regular files allocated by the #-adsh_file command. If the same file is allocated with both commands, the file will be postprocessed twice and an error might result.

Note the following about executing this command:

If the same option is specified more than once, the last specification takes effect.

Arguments

-s {step|job}

Specifies the timing for performing postprocessing on the file.

  • step

    Perform postprocessing on the file when the job step terminates.

  • job

    Perform postprocessing on the file when the job terminates.

You can issue this command within the job or job step regardless of the specified option, but the registered file is postprocessed when the next job step or job terminates. If no job step terminates after the file is registered with step specified, postprocessing is performed when the job terminates.

If this option is specified in a child job, this processing is performed within that child job.

-n {del|keep}

Specifies the postprocessing to be performed when the corresponding job step or job terminates normally.

  • del

    Delete the allocated regular file after the corresponding job step or job has terminated.

  • keep

    Do not delete the allocated regular file after the corresponding job step or job has terminated.

-a {del|keep}

Specifies the postprocessing to be performed when the corresponding job step or job terminates with an error.

  • del

    Delete the allocated regular file after the corresponding job step or job has terminated.

  • keep

    Do not delete the allocated regular file after the corresponding job step or job has terminated.

If file allocation processing by the adshfile command results in an error, the following takes place:

  • Postprocessing on the regular file specified in the corresponding adshfile command is not performed.

  • Of the regular files allocated with the adshfile command beforehand, postprocessing is performed according to the -a options specified in the adshfile commands.

-c {exist|no}

Specifies whether the file path is to be checked for its existence.

  • exist

    Check whether the file path exists.

    Postprocessing is registered only if the file path exists.

    If the file path does not exist, the command terminates with an error.

  • no

    Do not check whether the file path exists.

file-path

Windows: ~<path name>((1 to 247 bytes))

UNIX: ~<path name> ((1 to 1,023 bytes)

Specifies the path of the regular file that is to be allocated.

You can specify either a relative path or an absolute path. If a relative path is specified and its file path name exceeds the maximum permissible length after it has been converted to an absolute path name, an error results.

Return code

Return code

Meaning

0

Normal termination

99

Error termination

Notes

Unlike the #-adsh_file command, this command does not output to the job execution logs a message indicating the allocation results. To check the file path name specified in an argument of the adshfile command for purposes such as troubleshooting, do the following:

  1. Collect operation information by specifying YES in the EVENT_COLLECT parameter in the environment file.

  2. Execute the adshfile command in the job definition script.

    Operation information will be collected.

  3. Execute the adshevtout command to output the operation information.

  4. In the displayed operation information, check the lines in which command, indicating command information, is set in the EvtName column (the first column, which shows the type of operation information record).

Note that operation information for job definition scripts can be collected only in the normal mode in the execution environment. This information cannot be collected in the debugger mode in the execution environment or in the development environment.