Passing job standard output from one job to another as standard input in the same job stream instance
You can export the job standard output from a dynamic job to another job as standard input in the same job stream instance.
To
add a job standard output within another job definition, that it is
resolved locally on the agent at runtime, use the following syntax:
${job:<JOB_NAME>.stduri}
where <JOB_NAME> is
the name value or alias name value of the job from which you are exporting
the job standard output.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
NC112019#JOBC jobs. The NC112019#JOBC executable job
references the JOBA standard output. 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
NC112019#JOBC
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 input="${job:JOBA.stduri}" interactive="false" path="cat"/>
</jsdl:application>
</jsdl:jobDefinition>
DESCRIPTION "Added by composer for job stream: WIN92MAS#JS_PROP."
RECOVERY STOP
FOLLOWS JOBA
END