rmjobhistory command
Use the rmjobhistory command to delete job instances or history.
Synopsis
smcli rmjobhistory [-h | -? | --help]
smcli rmjobhistory [-v] [-I instance_list {-f file_name | [-j] job_list}
Description
If more than one job has the same name, this command deletes job instances for all jobs with the same name. If no instance IDs are specified, this command deletes all job instances for the specified jobs.
Operands
This command uses a list job names and ID as an operand. The list can optionally be preceded by the -j | --jobs option.
Options
- -f | --file {file_name | -}
- Retrieves data either from the input file file_name or
from input piped from another command.
To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks.
- The input data is the list of jobs to be displayed. This list can be a mixture of job names and ID, separated by commas or line breaks.
- -h | -?
- Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -h | -? | --help, the options are ignored.
- --help
- Displays detailed information about the command, including the
syntax, a description of the command, a description of the options
and operands, error codes, and examples. Tips:
- If you specify additional options other than -h | -? | --help, the options are ignored.
- You can also display detailed help in the form of man pages using the man command_name command.
- -I | --instance {instance_id [,instance_id...]}
- Deletes one or more job instances, specified by ID. The unique
ID is specified as a hexadecimal value prefixed with 0x (for example, 0x37).
If you do not specify this option, all job instances are deleted for the specified job.
Tip: You can use the lsjobhistory -a command to get a list of all job-instance IDs for each job. - -j | --jobs {job_oid | job_name}[,{job_oid | job_name}...]
- Targets one or more jobs, specified by names or ID.
This list can be a mixture of job names and ID, separated by a comma.
- job_oid
- The unique job ID, specified as a hexadecimal value prefixed with
0x (for example, 0x54).Tip: You can use the lsjob -o command to get a list of all job IDs.
- job_name
- The name of the job. Tips:
- Job names might not be unique. This command acts on all jobs with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple jobs with the same name. To target a job that has a name that is not unique, identify the job by specifying its unique, hexadecimal group ID, or use additional target options to refine the selection.
- The job name can be locale specific. The name specified must match the locale being used by the command line interface.
- If the job name contains a comma, prefix the comma with a backslash (\).
- You can use the lsjob command with no options to get a list of all job names.
- -v | --verbose
- Writes verbose messages to standard output.
If this option is not specified, this command suppresses noncritical messages.
Exit status
The following codes are returned by this command.- 0: The operation completed.
- 1: A usage error occurred.
- 2: The command or bundle was not found.
- 3: The command was not performed because either authentication failed or you are not authorized to perform the action.
- 10: The file was not found.
- 25: A number-formatting error occurred.
- 26: An invalid job name or ID was specified.
- 29: The specified locale is not valid or not supported.
- 60: The job-instance ID was not found.
Examples
- Remove all instances for a specific job
This example illustrates how to remove all instances for the job myjob.
smcli rmjobhistory myjob
- Removes multiple job instances
This example illustrates how to removes job instances 0x23 and 0x43 for jobs 0x54, myjob1, and 0x43.
smcli rmjobhistory -I 0x43,0x23 -j 0x54,myjob1,0x43