Passing job properties from one job to another in the same job stream instance
The job properties that you can export from one dynamic job to a successive job
in the same job stream instance depend on the job type you are defining. To add a job property
within another successor job definition, to have it 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 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.Only some job types can pass property values
to other successor jobs. The following types of job can export variables:
- Shadow jobs
- Properties
for shadow jobs shows the list
of properties that you can pass from one shadow job to another and
indicates the mapping between the
Extra information
properties of the job and the properties that you can use. - IBM Sterling Connect:Direct jobs
- Properties for IBM Sterling Connect:Direct jobs shows the list
of properties that you can pass from one IBM Sterling Connect:Direct job
to another and indicates the mapping between the
Extra information
properties of the job and the properties that you can use. - File transfer jobs
- Properties
for file transfer jobs shows
the list of properties that you can pass from one file transfer job
to another and indicates the mapping between the
Extra information
properties of the job and the properties that you can use.Since you can use wildcards to specify a partial name condition, you can transfer more than one file within the same job, and you have one full set of properties for each transferred file.
- JSR 352 Java Batch jobs
- Properties for JSR 352 Java Batch jobs shows the list of properties that you can
pass from one JSR 352 Java Batch job
to another and indicates the mapping between the
Extra information
properties of the job and the properties that you can use. - Job Management jobs
- Properties for Job Management
jobs shows the list of properties that you can
pass from one Job Management job to another
and indicates the mapping between the
Extra information
properties of the job and the properties that you can use. - Job Stream Submission jobs
- Properties for Job Stream Submission jobs shows the list of properties that you
can pass from one Job Stream Submission job to another and indicates the mapping between the
Extra information
properties of the job and the properties that you can use. - Database jobs
- Properties for database jobs shows the list of properties that you can pass
from one database job to another and indicates the mapping between the
Extra information
properties of the job and the properties that you can use.
The following example demonstrates how specifying variables in different formats allows for
variables to have different values because they are resolved at different times. It also
demonstrates how variables can be passed from job to job in a job stream instance. The
WIN92MAS_REW#VP_JS_141800058 job stream contains JOBA
and JOBB jobs. The JOBB executable job references the
following properties of the JOBA shadow job:
- ScheduledTime
- dJobNAme
- dJobStreamName
- dJobStreamWorkstation
SCHEDULE WIN92MAS_REW#VP_JS_141800058
:
WIN92MAS_REW#JOBA
TASK
<?xml version="1.0" encoding="UTF-8"?>
<jsdl:jobDefinition xmlns:dshadow=
"http://www.ibm.com/xmlns/prod/scheduling/1.0/dshadow" xmlns:
jsdl="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl">
<jsdl:application name="distributedShadowJob">
<dshadow:DistributedShadowJob>
<dshadow:JobStream>VPJS_141800058</dshadow:JobStream>
<dshadow:Workstation>nc125133</dshadow:Workstation>
<dshadow:Job>VP_JOBMON_141800058</dshadow:Job>
<dshadow:matching>
<dshadow:previous/>
</dshadow:matching>
</dshadow:DistributedShadowJob>
</jsdl:application>
</jsdl:jobDefinition>
DESCRIPTION "Sample Job Definition for DISTRIBUTED environment"
RECOVERY STOP
NC125133#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>
<jsdle:script>
echo ScheduledTime:${job:JOBA.ScheduledTime}
echo JobName:${job:JOBA.dJobName}
echo JobStreamName:${job:JOBA.dJobStreamName}
echo JobStreamWorkstation:${job:JOBA.dJobStreamWorkstation}
</jsdle:script>
</jsdle:executable>
</jsdl:application>
</jsdl:jobDefinition>
DESCRIPTION "Added by composer."
RECOVERY STOP
FOLLOWS JOBA
END
Shadow job properties that can be passed in another job definition | Shadow job Extra Information properties |
---|---|
|
|
|
|
|
|
|
|
IBM Sterling Connect:Direct properties that can be passed in another job definition | IBM Sterling Connect:Direct job Extra Information properties |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
For the file number counter, the properties that can be passed in another job definition (a set of properties for each transferred file) | For the file number counter, the job Extra Information properties (a set of properties for each transferred file) |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Only one value for each job. |
Note: The ${job:<JOB_NAME>.RemoteFile} and ${job:<JOB_NAME>.LocalFile} properties
apply to all actions in the Hadoop Distributed File System job.
The remaining properties apply to the Wait for a file action
only.
JSR 352 Java Batch job properties that can be passed to another job | Label |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The following variables are exported for each step of the job: | |
|
|
|
|
Job Management job properties that can be passed to another job | Label |
---|---|
${job:<JOB_NAME>. jobName} | jobname |
${job:<JOB_NAME>. jobstreamId} | jobstreamid |
${job:<JOB_NAME>.workstation} | workstation |
${job:<JOB_NAME>.user} | userName |
${job:<JOB_NAME>.url} | Url |
Job Stream Submission job properties that can be passed to another job | Label |
---|---|
${job:<JOB_NAME>.Url} | Url |
${job:<JOB_NAME>.workstation} | Workstation |
${job:<JOB_NAME>. jobstreamname} | Job Stream Name |
${job:<JOB_NAME>.datetime} | Earliest Start DateTime |
${job:<JOB_NAME>.variabletablename} | Variable Table Name |
${job:<JOB_NAME>.variablelistValues} | Variable Table Values {"key1":value1,"key2":value2,...} |
Database job properties that can be passed to another job | Label |
---|---|
${job:<JOB_NAME>.NumberOfRows} | Number of rows |
${job:<JOB_NAME>.PPS_ |
The name of the procedure expressed |
${job:<JOB_NAME>.PPS_ |
The value of the procedure expressed |