Synopsis
jobschgetoutput -m message -f Job output acquisition file name [ -s Maximum file size]
Description
The jobschgetoutput command acquires the output of jobs in the job net indicated by the message specified as a parameter.
This command can be used only when Systemwalker Operation Manager is linked to Systemwalker Centric Manager. This command is used as an execution command in the mail notification settings for automatic actions.
This command can handle only messages that have been output as a result of selecting the Completed, Abended, Canceled, Closed, Pseudo-normal or Automatic notification/handling checkbox in the Event output tab of the Define Jobscheduler Startup Parameters window.
Options
-m message
Specifies a Systemwalker Operation Manager message that is to be monitored by Systemwalker Centric Manager. This command is used as an execution command for Systemwalker Centric Manager's mail notification automatic action, so specify %MSG.
-f Job output acquisition file name
Specify the full path to the file that stores output information for the jobs in the job net indicated by the message.
If this command is used as an execution command for mail notifications in Systemwalker Centric Manager automatic actions, information will be stored in the specified file.
-s Maximum file size
Specifies the maximum number of bytes for the job output acquisition file. Specify a value between 1000 and 10000000. If this option is not specified, the maximum number of bytes will be 20000 bytes
Return Values
Return value | Meaning |
---|---|
0 | Indicates that processing has terminated normally. |
11 | Indicates that the message is in a format that cannot be handled by this command. |
12 | Indicates that reading job net information has failed. |
13 | Indicates that reading the job output has failed. |
14 | Indicates that writing the job output acquisition file has failed. |
21 | Indicates that the options have not been specified correctly. |
22 | Indicates that an error relating to the system or the user environment has occurred. |
31 | Indicates that an internal error relating to the Systemwalker Operation Manager environment has occurred. |
35 | Indicates that another type of internal error has occurred. |
Command Location
Windows | Systemwalker Operation Manager installation directory\MpWalker.JM\bin |
Solaris | /usr/bin |
Privilege/Execution Environment Required
System administrator (user belonging to the Administrator group or superuser) privileges are required.
Systemwalker Operation Manager server function and one of the following products must be running on the same machine:
Systemwalker Centric Manager V13.3.0 (either an Operation Management Server, Section Management Server or Job Server)
Example
To acquire job output as an execution command for mail notification (an automatic action) and store the job output in the file "/var/tmp/jobschoutput.log" with the default maximum file size, make the following definitions (for the UNIX version).
/usr/bin/jobschgetoutput -m %MSG -f /var/tmp/jobschoutput.log
Execution Results/Output Format
The format of the job output acquisition file is as follows:
Subsystem Number: Subsystem number Project Name: Project name Job Net Name: Job net name Job Net: Job net comment Job Name: Job number: Job name (Job status) Job number: Job name (Job status) . . Job Output (Job output percentage): Job number Job output Job number Job output Job number Job output . .
For the Standard Edition, this will be 0. For the Enterprise Edition, this will be the number of the subsystem that the job net indicated by the message belongs to.
This is the name of the project that the job net indicated by the message belongs to.
This is the name of the job net indicated by the message.
This is the comment for the job net indicated by the message.
This is a unique number for a job within the job net indicated by the message.
This is the name of a job in the job net indicated by the message. Job names vary according to the type of job and the execution attribute of the job net, as follows:
If the job is a batch framework job, then this will be the job name if a job name has been specified, or the batch job definition name otherwise.
If the job is a child job net, this will be the name of the child job net.
If the job is a linked job net, this will be the name of the linked job net.
If the execution attribute for the job net is "Interstage", the job name will be the workunit name.
If the execution attribute for the job net is "Normal", the job name will be the command name.
In all other cases, a job name will be used as the job name if it has been set explicitly, and the command name will be used as the job name unless a job name has been set explicitly. If a parameter has been set, then a space can be inserted between the command name and the parameter only if the command name is used as the name of the job. Any job definition variables included in the command name or parameters will not be replaced.
The job status is displayed as follows:
"Completed"
"Abended"
"Canceled"
"Warning"
"Executing"
"Waiting"
"Paused"
"Disabled"
"Pseudo-normal"
"Delayed"
This will be "all" if the entire job output is stored in the job output acquisition file. Otherwise, this will be the percentage of the job output that could be stored in the job output acquisition file, expressed as a percentage between 0% and 99%. The percentage is not completely accurate, because values are rounded down to the nearest integer. Use these percentages as an approximate indication of the proportion of the job output that is stored in the job output acquisition file.
This section is the job output, line by line. If a single job outputs multiple lines, each line will be stored in the job output acquisition file together with the job number as a set.
Cautions
If job output acquisition files do not need to be kept, enable deletion of transmitted files when making the settings for the execution command for mail notifications in Systemwalker Centric Manager automatic actions.
If the maximum file size is exceeded, data is stored in the job output acquisition file as follows:
The first part of the job output (from the beginning up to the maximum file size) is stored in the job output acquisition file.
Job output is stored line by line. Incomplete lines are not stored.
Job output is stored after any excess data has been deleted from the beginning of the file.
Job output is stored line by line. Incomplete lines are not stored.
Job output is stored separately for each job net in the order that they terminated.
There is a possibility that the header section and job output section of the job output acquisition file may not match (or this command may terminate with a return value of 13) if a job net is manipulated or edited before this command is executed after the job net has terminated.
This command will terminate with return value "12" if a job net is deleted before this command is executed after the job net has terminated.