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 a successive executable job as standard input in the same job stream instance. The job standard output variable is used in the input field of the executable job definition
To add a job standard output
within another executable job definition, to have it resolved locally
on the agent at run time, 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. Note: The stduri variable
passing is not supported for shadow jobs. Because shadow jobs do not produce a job log, if you pass
the job stdout variable as input to another job in the same job stream,
the output of the job is empty. A shadow job can only print a status
message.
Example
In this example, the NC112019#JS_PROP job stream contains the JOBALIAS_A that is the NC112019#JOBA alias and NC112019#JOBB jobs. The NC112019#JOBB executable job references the JOBALIAS_A standard output as standard input.
The database
definitions:
SCHEDULE NC112019#JS_PROP
:
NC112019#JOBA AS JOBALIAS_A
TASK
<?xml version="1.0" encoding="UTF-8"?>
<jsdl:jobDefinition xmlns:jsdl="http://www.ibm.com/xmlns/prod/scheduling/
1.0/jsdl" xmlns:
jsdle="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdle" name="executable">
<jsdl:application name="executable">
<jsdle:executable interactive="false" path="ls"/>
</jsdl:application>
</jsdl:jobDefinition>
DESCRIPTION "Added by composer for job stream: NC112019#JS_PROP."
RECOVERY STOP
NC112019#JOBB
TASK
<?xml version="1.0" encoding="UTF-8"?>
<jsdl:jobDefinition xmlns:XMLSchema="http://www.w3.org/2001/XMLSchema"
xmlns:jsdl="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl" xmlns:
jsdle="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdle" XMLSchema:text=
"resolveVariableTable"
name="executable">
<jsdl:application name="executable">
<jsdle:executable input="${job:JOBALIAS_A.stduri}"
interactive="false" path="cat"/>
</jsdl:application>
</jsdl:jobDefinition>
DESCRIPTION "Added by composer for job stream: WIN92MAS#JS_PROP."
RECOVERY STOP
FOLLOWS JOBALIAS_A
END