Hitachi

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


adshhk command (deletes spool jobs)

Organization of this page

Format

adshhk target-list-file-name report-file-name log-file-name [number-of-days]

Description

This command deletes spool jobs from the spool directories identified in the list file specified in target-list-file-name. The execution results are output in CSV format to the file specified in report-file-name. Messages output during execution, such as error messages, are output to the file specified in log-file-name.

This command and the adshevtout command apply exclusive control over spool directories. If the adshhk command is unable to obtain a lock on a spool directory, it skips processing of that spool directory and outputs the KNAX4425-E message.

Arguments

target-list-file-name

Specifies the file name of the file that specifies the spool directories that contain spool jobs that are to be targets for deletion. You specify in advance in the target list file the names of the spool root directories containing the spool directories to be deleted and for each a number-of-days value. Spool jobs that were executed more than the specified number of days prior (the count begins from the day before the adshhk command was executed) are deleted from the specified spool directory.

The target list file can contain multiple lines in text file format. A line cannot exceed 4,095 bytes, counting from the beginning of the line through the end-of-line code at the end. The values must be enclosed in double quotation marks (").

The format of the target list file is:

"spool-root-directory-name"[,"number-of-days"]

The following explains each item.

spool-root-directory-name ~<path name>((1 to 128 bytes))

Specifies the name of a spool root directory whose spool jobs are candidates for deletion. Specifying the full path is recommended.

number-of-days ~<unsigned integer>((1 to 999))

Specifies a days-count value to be used to determine the spool jobs to be deleted from the spool directory. The spool job directory of batch jobs that were executed more than the specified number of days prior (the count begins from the day before the adshhk command was executed) are deleted. If this value is omitted in the list file for a spool directory, the value specified in the number-of-days argument in the adshhk command is used. If no number-of-days value is specified in the file or in the command argument, the line generates an error, but subsequent lines are processed.

Specifying "" is same as omitting the number-of-days specification.

report-file-name

Specifies the name of the output file for the execution results. The report file is output in CSV format. If the specified file does not exist, it is created. If it already exists, its existing contents are overwritten.

The report file access permissions are set as follows:

  • Windows: According to the settings for the output folder.

  • UNIX: 600

For an example of a report file's output, see 3.8 Deleting spool jobs.

log-file-name

Specifies the name of the output file for error messages and other messages. If the specified file does not exist, it is created. If it already exists, its existing contents are overwritten.

The log file access permissions are set as follows:

  • Windows: According to the settings for the output folder.

  • UNIX: 600

number-of-days ~<unsigned integer>((1 to 999))

Specifies a days-count value to be used to determine the spool jobs to be deleted from the spool directories. The spool job directory of batch jobs that were executed more than the specified number of days prior (the count begins from the day before the adshhk command was executed) are deleted. This argument takes precedence over the number-of-days values specified in the target list file. When this argument is omitted, the number-of-days values specified in target list file are used. If you omit this argument, you must specify number-of-days values in the target list file.

Return codes

Return code

Meaning

0

Normal termination

1

Error termination

2

Deletion failed because a spool directory is being used by another program (the return code might be other than 2 if other errors occurred).

253

Error in standard error output

Notes

Usage example