Job context structure
Provides a list and explanation of all fields in the job context structure.
When a job runs, it generates a certain amount of information, which is stored in JSON format and is available for querying and manipulating with JSONata.
This topic provides a list and an explanation of all supported fields in the job
context structure.
Field name | Explanation | Notes |
---|---|---|
RC | Job return code. Present only if the job has completed. | |
var | Variables defined in the job stream. | If a job can retrieve variables from several resources, the
following hierarchy applies:
|
js | Job stream data | |
js.key | The full job stream key, consisting of submission time and job stream ID | |
js.start | The earliest time a job stream can be launched. | |
js.actualStart | The time the job stream actually started. | |
js.latestStart | The latest time a job stream can be launched. | |
js.deadline | The time within which a job stream should complete. | |
js.defId | Job stream definition ID | |
js.wksId | Job stream workstation ID | |
js.name | Job stream folder and base name | |
js.schedTime | Job stream scheduled time | |
js.id | Job stream ID | |
js.wks | Job stream workstation name and folder | |
jobs | Jobs data | |
jobs.job_name.wa.key | The full job key, consisting of submission time and job stream ID | |
jobs.job_name.wa.start | The earliest time a job can be launched. | |
jobs.job_name.wa.actualStart | The time the job actually started. | |
jobs.job_name.wa.latestStart | The latest time a job can be launched. | |
jobs.job_name.wa.deadline | The time within which a job should complete. | |
jobs.job_name.wa.runId | The ID the job after it is submitted | |
jobs.job_name.jobDef | Job definition name and folder | |
jobs.job_name.wksId | Job workstation ID | |
jobs.job_name.wa.logon | Job logon user | |
jobs.job_name.wa.name | Job base name | |
jobs.job_name.rerunNum | Job rerun number (if any) | |
jobs.job_name.wa.RC | Job return code | |
jobs.job_name.wa.id | Job ID | |
jobs.job_name.wa.jobDefId | Job definition ID | |
jobs.job_name.wa.wks | Job workstation | |
...output properties | ||
... output conditions | In case of conflict, output conditions are overridden by output properties |
You can specify the job context formatting as follows:
- T:
- Text format. This is the default value.
- J:
- JSON format
- Y:
- YAML format
For example, to print the whole job context in JSON format, use the following
notation:
${J:$}
Note: Special characters, such as - + * / %, must be enclosed in single
or double quotes so that they can be parsed correctly. Consider the following
examples:
${jobs.JOB1_DEFINITION_161603134.'Transfer-Encoding'}
${jobs.JOB1_DEFINITION_161603134."Transfer-Encoding"}
The following is an example of the empty job context structure:
{
RC
var: {
key:val... },
"js" : {
"defId" : "",
"wksId" : "",
"name" : "",
"schedTime" : "",
"id" : "",
"wks" : ""
},
"jobs" : {
"job_name" : {
"wa" : {
"jobDef" : "",
"wksId" : "",
"logon" : "",
"name" : "",
"rerunNum" : ,
"id" : "",
"jobDefId" : "",
"wks" : ""
... output properties
... output conditions
},
...
}
}
For an example populated with data from several jobs, see Job context structure example.