This section explains how to use the jobschmsgevent command to perform job net linkage using variable parameters simultaneously when a message event is notified.
It is possible to link to a job net to pass variable parameters at the same time that a message event is notified. This removes the need to define a large number of job nets when running multiple job nets (businesses) that only differ in the commands or parameters that they use, or in the host that is requesting execution of a job.
For job nets that are triggered by a message event, register job that pass variable parameters as well as message event notifications. By defining in advance the variables for a job in the job net that receives variable parameters, it is also possible to start the job with the received variable parameters that replace the variables.
Job nets that satisfy all of the following conditions can receive variable parameters:
The job nets are not registered with a group.
The job nets have the Job Execution Control attribute.
Start only when message event has occurred is specified as an execution condition and the job nets satisfy one of the following conditions:
The job nets are waiting for a single message event.
The job nets are waiting for one of a number of registered message events.
Even if the content of a definition satisfies the above conditions as a result of a temporary change, the job net can still receive variable parameters.
Note also that in the case of a job net in a nested structure, variable parameters will also be inherited by and can be used by the job nets at the second and subsequent levels.
Defining jobs
The following sections explain how to define jobs when variable parameters are used. The definition method is explained for both jobs that pass variable parameters and jobs that receive variable parameters.
Refer to "7.4 Starting a Job Net with Variable Parameters" for information on specifying variable parameters manually when starting a job net.
Defining a job that passes a variable parameter
Set the job information by specifying jobschmsgevent (the Message Event Generation Command) with a variable parameter (-p option) in the Standard information sheet of the Add/Change - Job window. Job information can also be set with the jobschsetnet command.
Refer to the Systemwalker Operation Manager Reference Guide for details on the jobschmsgevent and jobschsetnet commands.
Strings in the format "@variable name@" in a variable parameter are treated as normal strings, not as job net variables or job definition variables.
If a variable parameter is replaced by a "@.VPARAM@" variable in the job definition of a running job net, ensure that the definition item does not contain invalid characters and that the resultant character string is not longer than the maximum limit. If a replacement results in an invalid job definition, the job will terminate abnormally without running.
Refer to "jobschmsgevent Command" in the Systemwalker Operation Manager Reference Guide for details on variable parameters.
Defining a job that receives a variable parameter
Set job information by specifying the "@.VPARAM@" variable for the items to be replaced by the received variable parameter in the Standard information sheet of the Add/Change Job window. Alternatively, use the jobschsetnet command to define the job.
The "@.VPARAM@" variable can be used with the following items in the Standard information sheet. There is no limit to the number of items for which variables can be specified. Variables can be specified for multiple items, and multiple variables can also be specified for each item.
Command
Parameters
Request host
Value of the environment variable (Value in the Set Environment Variables window)
The "@.VPARAM@" variable cannot be used in the following jobs:
Jobs with the Interstage attribute
Jobs with the PowerAIM attribute
Jobs with the Normal attribute
If a job net that uses a variable within its job definitions is started without any variable parameter specified, its jobs will start with the variable component replaced by an empty character string.
If a job net is to be started by passing a variable parameter simultaneously when a message event is notified, it is possible to make a copy of the job net to be started and to start the copy instead. The specified suffix is appended to the copied job net name and job net comment. This enables multiple job nets with different parameters to have different suffixes and run in parallel, and allows job nets with different parameters to run without any danger of execution results being overwritten.
As the above diagram shows, to copy and start a job net, use the Message Event Generation Command (jobschmsgevent) with a variable parameter (-p option) and suffix (-c option) to set the job information.
Refer to the Systemwalker Operation Manager Reference Guide for details on the jobschmsgevent command.
Copy and startup
The following explains how to copy and start a job net using the variable parameters and suffixes.
The job net will be copied when it is started.
If the job net is in a nested structure, job nets at the second and subsequent levels will also be copied.
Copy and startup cannot be performed in the following cases:
The job net exists within a group.
The status of the job net to be copied is any of the following:
Disabled
Paused
Executing (Copy and startup will not take place even if Valid during job net execution is specified.)
End delayed
Warning
Abended (when Validate job net confirmation is selected in the Advanced Settings for Verification window)
Canceled (when Validate job net confirmation and Check canceled are selected in the Advanced Settings for Verification window)
A job net of the same name has been created manually in the copy destination.
A job net of the same name exists in the copy destination and the status of the job net is one of the following:
Executing (when Validate job net confirmation is selected in the Advanced Settings for Verification window)
End delayed
Warning
Abended (when Validate job net confirmation is selected in the Advanced Settings for Verification window)
Canceled (when Validate job net confirmation and Check canceled are selected in the Advanced Settings for Verification window)
If copy and startup is performed for a job net for which Carry over the process regardless of the day change time is selected in the Message sheet of the Job Net Properties window, that job net will be treated as having started if even one of the copy destination job nets is already active. This is true even if the original job net has not started.
Note
"Copy and start" operation of job nets containing linked job nets
A "copy and start" operation can be performed on parent job nets containing linked job nets.
Linked job nets that have been duplicated by a "copy and start" operation do not run as linked job nets, nor do the duplicate job nets of any job nets at levels below such job nets. Even if changes are made to a master linked job net, the changes will not be reflected to duplicate linked job nets.
Duplicate job nets (copy destination job nets)
The following explains copy destination job nets that were copied and started using the variable parameters and suffixes.
The job net name and job net comment of a copy destination job net are as follows:
name of job net to be copied_suffix specified with -c option
A copy destination job net does not inherit the execution condition of the copy source or the settings of the base job net. The execution condition reverts to None.
Jobs within a copy destination job net inherit the operational status ("Disabled" or "Paused").
The following operations cannot be performed on a copy destination job net:
Pause, Continue, Disable, Enable, Reinstate and Revoke in the Operate menu
Modify
Reuse
Copy
Startup Days
Changes to the Job Net Properties window
Job Net Temporary Change
Return to Normal Schedule
The -nent, -nche, -ncpy, -sent and -sdel options of the jobschsetnet command
The pause, continue, disable, enable, reinstate and revoke options of the jobschcontrol command
Copy destination job nets are not updated immediately in the job tree of the job selection window. They appear in the tree when the window is refreshed.
When a variable parameter (-p option) or a suffix (-c option) is specified for the Message Event Generation Command (jobschmsgevent), the operation for receiving variable parameters and accepting message events may differ from the normal operation.
Job nets that cannot receive variable parameters
In some cases, variable parameters (-p option) and suffixes (-c option) may be ignored even when a message event is accepted.
When the following job nets receive a message event that has variable parameters, the variable parameter and suffix information will be ignored:
When there is more than one message event that the job net waits for and when the Start when all message events have occurred option is selected in the Queuing condition frame of the Message sheet of the Job Net Properties window
When there is more than one message event that the job net waits for and the Execution condition frame in the Standard information sheet of the Job Net Properties window is as follows:
The Execute at option is specified
The Execution interval option is specified
The Start at the time of server startup option is selected
Job nets that cannot receive message events
In some cases message events cannot be received when a variable parameter (-p option) or suffix (-c option) is specified.
The following table lists the job net settings and status combinations that prevent job nets from receiving message events.
Refer to "14.4.3 Receiving Message Events" for information about the normal reception of message events.
Status of job net receiving event (Status of job net to be copied) | Status of job net that was copied and started | Message event count | Remarks | |
---|---|---|---|---|
With variable parameters | With variable parameters and suffixes | |||
Not executing | Executing/End delayed/Warning | Y | N | |
Not abended or canceled | Abended/Canceled | Y | N | *1 |
Executing/End delayed/Warning | Not executing | N | N | *2 |
Paused | Not paused | N | N |
Y: Message events can be received in the normal way N: Message events cannot be received *1: "Abend" applies when Validate job net confirmation is selected in the Advanced Settings for Verification window.
"Canceled" applies when Validate job net confirmation and Check canceled are selected in the Advanced Settings for Verification window.
*2: Message events are not received even when Valid during job net execution is selected in the Message sheet of the Job Net Properties window.