Top
Systemwalker Operation Manager  User's Guide
FUJITSU Software

4.3.14 Using Job Net Variables to Pass Information between Jobs

To share information across jobs in a job net, pass it as a job net variable and use it on succeeding jobs. This allows for flexible job operations. For example, message event and file name information for which a job waits can be passed as job net variables, enabling processing for the succeeding job to be changed to suit specific requirements.

Flow for using job net variables

If you set a job net variable in a job definition, you can use the line with the format "<string>(NAME)=<string>(VALUE)" from the job output information as a job net variable.

In addition, specify a definition for the succeeding jobs in the same job net so that they use the job net variable. The succeeding jobs can use the job net variable to perform specific processing.

In jobs that will use job net variables, specify the portion to be replaced with a job net variable value at execution in the format "@job net variable name@". When the jobs are executed, that portion will automatically be replaced with the value of the specified job net variable and operations will continue.

The following figure illustrates the definition, operation, and result of jobs that set the job net variables, and jobs that use the job net variables when you define job net variables for a job in a job net.

4.3.14.1 Job net variables

Job net variables can be used between jobs within the same job net. They are shared by the jobs within a job net and can be handled individually for each job net. You can also use job net variables between the parent job net and the child job nets of a layered job net.

There are two types of job net variable:

Job net variables obtained from job output information

If a line with the format "<string>(NAME)=<string>(VALUE)" is output as the job execution result, you can replace the portion in the format "@job net variable name@" in the succeeding job with "<string>(VALUE)" before using the job. Job net variables that thus use variable information obtained from job execution results are explained below.

Job net variable names

The format of a job net variable name is as follows:

<job net variable prefix>.<string>(NAME)

Example job net variable name and value

Definable strings

The following strings can be defined for the job net variable name and job net variable value:

Type

Definable string

Job net variable prefix

Alphanumeric string of up to 13 bytes

Job net variable name
(<string>(NAME))

String of up to 50 bytes containing alphanumeric characters and underscores ("_")
Leading and trailing spaces and tabs are ignored.

If the string exceeds 50 bytes excluding leading and trailing spaces and tabs, it is not treated as a job net variable.

Job net variable value
(<string>(VALUE))

String of 0 to 512 bytes (*1)
User-defined characters cannot be used. The line feed character at the end of the string is not included, but leading and trailing spaces and tabs are included.
If the string exceeds 512 bytes excluding the line feed character at the end of the string and if it contains any user-defined character, the string will not be treated as a job net variable.

*1: When defining a value for the job net variable, ensure that the definition
    item that will replace "@variable name@" in the definition of the job to be 
    started does not contain any invalid characters or exceed the maximum string 
    length. If a replacement results in an invalid job definition, the job will 
    terminate abnormally without running.

Limit values of job net variables

Job nets can import up to 640 job net variables from job output information.

The upper limit on the number of job net variables that can be used by a layered job net is 640 for the parent job net and child job nets combined.

Job net variables automatically set by the system

The variable name of a job net variable automatically set by the system is fixed. The variable value is set specifically for each job net or job and does not change while the job net is running. The types of job net variable automatically set by the system are explained below.


Job net variables automatically set by the system

Variable name

Variable value

@.VPARAM@

Variable parameter. This is variable information that can be specified each time a job net is started. If no variable parameter value has been set, this variable is replaced with a blank string.

@.PROJECT@

Name of the project in which the job to be executed is registered.
If the Master Schedule Management function is being used, this variable is the name of the schedule by dates project.

@.JOBNET@

Name of the job net in which the job to be executed is registered.

@.JOBNAME@

Job name if Job name was registered in job registration information.
If Job name was not registered, this variable is replaced with a space.

@.SUB_SYSTEM@

[SE]
Not replaced.
[EE]
Number (0 to 9) of the subsystem in which the job to be executed is registered.
For non-multi-subsystem operations, "0" is set.

@.MASTER_PROJECT@

[SE]
Not replaced.
[EE]
(when the Master Schedule Management function is enabled)
Name of the master project of the Master Schedule Management function. If the name of the project in which the job to be executed is registered ends with a date in the format "+mmdd" or "=mmdd" (where mmdd is a 4-digit number), this name excludes "+mmdd" or "=mmdd".
If the project name does not end with "+mmdd" or "=mmdd", it is replaced with a space.
(when the Master Schedule Management function is disabled)
This variable is replaced with a space.

4.3.14.2 Setting Job Net Variables by using a Job

This section explains how to set job net variables by using a job.

Defining a job that sets job net variables

This section explains the steps required when creating and defining a job for setting job net variables.

  1. Create a job (execution file)

    Create a job that outputs the variables and associated values at execution in the format "<string>(NAME)=<string>(VALUE)"

  2. Configure the settings in the Add/Change - Job window

    • Standard information tab

      • Clear Do not save standard/error output

        If this check box is specified, job output information is not output and so no job net variables are set.

    • Detail information tab

      • Select Set the job output information "NAME=VALUE" in the job net variable

      • In Job net variable prefix, set a value that is unique to the job

    Figure 4.47 Standard information tab of the Add/Change - Job window

    Figure 4.48 Detail information tab of the Add/Change - Job window

Types of jobs that can be set for job net variables

Set job net variables using the strings described in "Definable strings".

Event wait jobs and some criterial jobs provided by Systemwalker Operation Manager output information in the format "<string>(NAME)=<string>(VALUE) ", which can be used for job net variables.

The types, variable names, and output values of these jobs are explained below. Information is output to standard output in the format "<variable name>=<output value>".


Wait for file job/file existence criterial job (chkfile/jobschchkfile command)

Variable name

Output value

Condition for output

CF_FILENAME

File name of the file that was changed (full path)

When any of the following is specified: Create (-fwait)/delete (-fdelete)/update (-fupdate)/change size (-fsize)

CF_CHKTYPE

One of the following change types:
"fwait"/"fdelete"/"fupdate"/"fsize"

When any of the following is specified: Create (-fwait)/delete (-fdelete)/update (-fupdate)/change size (-fsize)

CF_FILESIZE

File size (bytes)

When any of the following is specified: Create (-fwait)/update (-fupdate)/change size (-fsize)

CF_FILEYEAR

File update year "yyyy"

When any of the following is specified: Create (-fwait)/update (-fupdate)/change size (-fsize)

CF_FILEDATE

File update date "mmdd"

When any of the following is specified: Create (-fwait)/update (-fupdate)/change size (-fsize)

CF_FILETIME

File update time "hhmm"

When any of the following is specified: Create (-fwait)/update (-fupdate)/change size (-fsize)


Wait for message event job (jobschchkmsgevt command)

Variable name

Output value

Condition for output

CM_MSGEVENT

Name of the message event that was generated

This information is always output.

CM_PRJNAME

Name of the project in which the message event was generated

When a project name is specified and a message event is generated

CM_NETNAME

Name of the job net in which the message event was generated

When a job net name is specified and a message event is generated

CM_VPARAM

Variable parameter specified when the message event was generated

When a variable parameter is specified and a message event is generated

CM_EVLOGSRC

Source name of the event log defined in the message table

When a message event is generated by the message table definition

CM_EVLOGEID

Event ID of the event log defined in the message table

When a message event is generated by the message table definition

CM_MAILFILE

Mail file name of the message event generated upon mail receipt

When a message event is generated by mail receipt


Check log file job (jobschchecklog command)

Variable name

Output value

Condition for output

CL_FILENAME

Name of the log file to be checked (specified in the -f option)

This information is not output when the -h or -v option is specified.

CL_LOGCOUNT

Number of lines that match the conditions according to the check results

This information is not output when the -h or -v option is specified.

CL_LOGTEXT

Content of the last line that matches the conditions according to the check results

This information is not output under the following conditions:
- The -h or -v option is specified
- When the check finds 0 lines that match the conditions


Wait for time job (jobschchecktime command)

Variable name

Output value

Conditions for output

CT_WTIME

Specified wait time "hhmm"

This information is always output.

CT_LTIME

Specified maximum wait time "hhmm"

When the -lt option is specified


Wait until specified time job (jobschsleep command)

Variable name

Output value

Conditions for output

SL_SLEEPSEC

Specified wait time (seconds)

This information is always output

Setting job net variables

4.3.14.3 Replacing the Job Net Variables and Executing a Job

A value specified for a job net variable can be used in a succeeding job. To do this, specify the job net variable name and define the succeeding job.

This section explains how to define jobs that use job net variables.

Defining jobs that use job net variables

In the Add/Change - Job window, define job net variables for the items you want to be replaced with job net variables when the job is executed.

Figure 4.49 Standard information tab of the Add/Change - Job window

Using a job net variable (@variable name@)

Job net variable values

Checking the job net variable value that is used

When jobs that use job net variables are executed, the job net variables are replaced with the variable values and operations continue. You can check the job net variable values that were actually substituted by opening the Previous log tab of the Monitor - Job window.

Figure 4.50 Previous log tab of the Monitor - Job window

Job net variable

This information was used as the job net variable when a job was executed. It is not displayed if the job net variable "@variable name@" is not used in the job definition.

Job net variables automatically set by the system are not always displayed.

Parameter information specified at variable parameter startup is displayed regardless of whether it is used in the job definition.

Information

Using job net variable criterial jobs

Use job net variable criterial jobs to check if the values of job net variables set at execution of the preceding job are the expected string and numeric values.

Job net variable criterial jobs can be used, for example, to allocate the processing of succeeding jobs based on the result of the check by the job net variable criterial job.

Job net variable criterial jobs can perform the following comparisons:

  • String comparison

    • Checks if the variable value matches the comparison string, or contains the comparison string

  • Numeric comparison

    • Checks if the variable value matches the specified value, or compares the size of the values

  • Numeric range comparison

    • Checks if the variable value is between two specified values

Note that the job net variable criterial jobs cannot be used to determine the job net variables automatically set by the system.

Information

Job net variable information file

Information about variables used during job execution and the result of importing the job net variables are stored in the job net variable information file. If the job net variables must be investigated because, for example, the job terminated abnormally, directly reference the job net variable information file. The following information can be checked in the job net variable information file:

  • Variables imported by each job from its job output information

  • Variables used by each job when it is run

  • List of variables in effect when the job net ends

The job net variable information file is updated as required while the job net is running. Do not reference the relevant job net variable information file while the job net is running.

Refer to the Systemwalker Operation Manager Reference Guide for information on the job net variable information file.