HCL Workload Automation, Version 9.4

Passing job properties from one job to another in the same job stream instance

You can export some job properties from one job on HCL Workload Automation agent for z/OS to another in the same job stream instance

You can export some job properties from one job on HCL Workload Automation agent for z/OS to another in the same job stream instance. To add a job property within another job definition, that it is resolved locally on the agent at run time, use the following syntax:
${job:<JOB_NAME>.<property_name>}
where <JOB_NAME> is the name value or the alias name value of the job from which you are exporting the property values and <property_name> is the property that you are referring to. The <property_name> value is case insensitive.

Table 1 shows the list of properties that you can pass from dynamic job on HCL Workload Automation agent for z/OS to another job and indicate the mapping between the Extra information properties of the job and the properties that you can use.

Table 1. Properties for dynamic jobs on HCL Workload Automation agent for z/OS
Dynamic job on HCL Workload Automation agent for z/OS properties that can be pass in another job definition Dynamic job on HCL Workload Automation agent for z/OS Extra Information properties
${job:<JOB_NAME>.zAgentJESId}
JES Id
${job:<JOB_NAME>.zAgentJobName}
Job Name
${job:<JOB_NAME>.zAgentStartReaderTime}
Start Reader Time

Example

The following example demonstrates how variables can be passed from job that run on HCL Workload Automation agent for z/OS to another executable job that run in the same job stream instance. The WIN92MAS#JS_PROP job stream contains ZSPD_ZOS1274#DDRIVEN_JOB used with alias JOBA and NC112016#JOBB jobs. The NC112016#JOBB executable job references the following properties of the JOBA job that is defined on HCL Workload Automation agent for z/OS:
  • zAgentJESId
  • zAgentJobName
  • JOBA.zAgentStartReaderTime
The database definitions:
SCHEDULE WIN92MAS#JS_PROP 
:
ZSPD_ZOS1274#DDRIVEN_JOB AS JOBA
 TASK
    <?xml version="1.0" encoding="UTF-8"?>
<jsdl:jobDefinition xmlns:jsdl="http://www.abc.com/xmlns/prod/scheduling/1.0/
jsdl" xmlns:
jsdljcl="http://www.abc.com/xmlns/prod/scheduling/1.0/jsdljcl" name="JCL">
  <jsdl:application name="jcl">
    <jsdljcl:jcl>
   <jsdljcl:JCLParameters>
    <jsdljcl:jcl>
     <jsdljcl:byRefOrByDef>
      <jsdljcl:byDefinition>
       <jsdljcl:jclDefinition>//JOB JOB             
//S1 EXEC PGM=IEFBR14</jsdljcl:jclDefinition>
      </jsdljcl:byDefinition>
     </jsdljcl:byRefOrByDef>
    </jsdljcl:jcl>
   </jsdljcl:JCLParameters>
   <jsdljcl:JOBParameters>
    <jsdljcl:jobStreamName>${tws.jobstream.name}</jsdljcl:jobStreamName>
    <jsdljcl:inputArrival>${tws.job.ia}</jsdljcl:inputArrival>
   </jsdljcl:JOBParameters>
  </jsdljcl:jcl>
  </jsdl:application>
</jsdl:jobDefinition>
 DESCRIPTION "Added by composer for job stream: WIN92MAS#JS_PROP."
 RECOVERY STOP

NC112016#JOBB
 TASK
    <?xml version="1.0" encoding="UTF-8"?>
<jsdl:jobDefinition xmlns:XMLSchema="http://www.w3.org/2001/
XMLSchema" xmlns:
jsdl="http://www.abc.com/xmlns/prod/scheduling/1.0/jsdl" xmlns:
jsdle="http://www.abc.com/xmlns/prod/scheduling/1.0/jsdle" XMLSchema:
text="resolveVariableTable" name="executable">
  <jsdl:application name="executable">
    <jsdle:executable interactive="false">
            <jsdle:script>
echo JES Id = ${job:JOBA.zAgentJESId}
echo Job Name = ${job:JOBA.zAgentJobName}
echo Start Reader Time = ${job:JOBA.zAgentStartReaderTime}
</jsdle:script>
        </jsdle:executable>
  </jsdl:application>
</jsdl:jobDefinition>
 DESCRIPTION "Added by composer for job stream: WIN92MAS#JS_PROP."
 RECOVERY STOP
 FOLLOWS JOBA