Defining variables in dynamic workload broker jobs

This section explains how to add variables to jobs you plan to run with dynamic workload broker.

You can include variables in your job definition. The variables are resolved at submission time.

The supported variables are as follows:
Table 1. Supported HCL Workload Automation variables in JSDL definitions.
Variables that can be inserted in the dynamic workload broker job definition Description
tws.host.workstation Name of the host workstation.
tws.job.date Date of the submitted job.
tws.job.fqname Fully qualified name of the job (UNISON_JOB).
tws.job.ia Input arrival time of the job.
tws.job.interactive Job is interactive. Values can be true or false. Applies only to jobs compatible with earlier versions.
tws.job.logon Credentials of the user who runs the job (LOGIN). Applies only to jobs compatible with earlier versions.
tws.job.name Name of the submitted job.
this.name The integration type of the job (for example, executable). Note that this variable returns theintegration type, not the name of the job.
job.<JOB_NAME>.name The integration type of the specifically referenced job (for example, executable).
tws.job.num UNISON_JOBNUM.
tws.job.priority Priority of the submitted job.
tws.job.promoted Job is promoted. Values can be YES or No. For more information about promotion for dynamic jobs, see Promoting jobs scheduled on dynamic pools .
tws.job.recnum Record number of the job.
tws.job.resourcesForPromoted Quantity of the required logical resources assigned on a dynamic pool to a promoted job. Values can be 1 if the job is promoted or 10 if the job is not promoted. For more information about promotion for dynamic jobs, see Promoting jobs scheduled on dynamic pools.
tws.job.taskstring Task string of the submitted job. Applies only to jobs compatible with earlier versions.
tws.job.workstation Name of the workstation on which the job is defined.
tws.jobstream.id ID of the job stream that includes the job (UNISON_SCHED_ID).
tws.jobstream.name Name of the job stream that includes the job (UNISON_SCHED).
tws.jobstream.workstation Name of the workstation on which the job stream that includes the job is defined.
tws.master.workstation Name of the master domain manager (UNISON_MASTER).
tws.plan.date Start date of the production plan (UNISON_SCHED_DATE).
tws.plan.date.epoch Start date of the production plan, in epoch format (UNISON_SCHED_EPOCH).
tws.plan.runnumber Run number of the production plan (UNISON_RUN).
The following example illustrates a job definition where variables are used to return both the name of the job and the plug-in type. For a job named TEST2 of type executable, the variables in the script are resolved as follows:
  • ${tws.job.name} resolves to TEST2
  • ${this.name} resolves to executable
  • ${job.TEST2.name} resolves to executable
**$JOBS
WA_AGT#TEST2
 TASK
    <?xml version="1.0" encoding="UTF-8"?>
<jsdl:jobDefinition xmlns:jsdl="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl" 
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jsdle="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdle" 
xs:text="resolveVariableTable" name="executable">
    <jsdl:application name="executable">
        <jsdle:executable interactive="false">
            <jsdle:script>echo ${tws.job.name}
echo ${this.name}
echo ${job.TEST2.name}</jsdle:script>
        </jsdle:executable>
    </jsdl:application>
</jsdl:jobDefinition>
 RECOVERY STOP**