JSON document specifications for z/OS jobs REST interface requests
This section describes the contents of the JSON documents that are used with z/OS® jobs REST interface requests.
Job document
Table 1 shows the contents of the JSON job document.
Property | Description |
---|---|
jobid | Job ID. |
jobname | Job name. |
subsystem | The primary or secondary JES subsystem. If this value is null, the job was processed by the primary subsystem. |
owner | The z/OS user ID associated with the job. |
status={
INPUT| ACTIVE| OUTPUT } |
Job status. One of the following values:
If this value is null, the job status cannot be determined. |
type={
JOB| STC| TSU } |
Job type. One of the following values:
|
class | Job execution class. |
retcode={
ABENDUnnnn | ABEND Sxxx | CANCELED | CC nnnn | CONV ABEND | CONV ERROR | JCL ERROR | SEC ERROR | SYS FAIL } |
Job completion code. One of the following values:
If this value is null, the job was not yet completed. |
url | Resource URL based on original HTTP request. |
files-url | Resource URL for listing the spool files for the job. |
job-correlator | Job correlator. If this value is null, the job was submitted to JES3. |
phase | Job phase. Provides a numeric indicator of the current state of the job. |
phase-name | Job phase name. Provides a text description of the specific phase of the job. |
step-data | Step data information. Provides information about each step in the job, such as the step name, step number, and completion code. For more information, see Job step data document. |
exec-system | System name of the z/OS system on which the job ran (up to 8 characters). |
exec-member | Member name of the z/OS system on which the job ran (up to 8 characters). |
exec-submitted | Time when the job was submitted to run (the input end time). |
exec-started | Time when job execution started. |
exec-ended | Time when job execution ended. |
reason-not-running | Text identifying one or more reasons why the job is not running. |
Job completed document
Table 2 shows the contents of the JSON job completed document.
Property | Description |
---|---|
job-correlator | Job correlator. If this value is null, the job was submitted to JES3. |
jobid | Job ID. |
jobname | Job name. |
owner | The z/OS user ID associated with the job. |
class | Job execution class. |
retcode={
ABENDUnnnn | ABEND Sxxx | CANCELED | CC nnnn | CONV ABEND | CONV ERROR | JCL ERROR | SEC ERROR | SYS FAIL } |
Job completion code. One of the following values:
|
completion-type | Specific completion type:
|
completion-code | Completion code. Set for completion-type values 1 and 2. Otherwise, null. |
abend-code | Job completed with abend code. Set for completion-type values 5 and 8.
Otherwise, null. When set, one of the following values:
|
Job feedback document
Table 3 shows the contents of the JSON job feedback document.
Property | Description |
---|---|
jobid | Job ID. |
jobname | Job name. |
original-jobid | Original job ID. If the job was processed on another system, this value represents the original job identifier that was assigned when the job was submitted on the host system. If the target system cannot assign the original job identifier, the target system assigns a new ID to the job, which is indicated as "jobid" in this document. |
owner | z/OS user ID associated with the job. |
member | JES2 multi-access spool (MAS) member name. |
sysname | z/OS system name. |
job-correlator | Job correlator. If this value is null, the job was submitted to JES3. |
status={n}
|
job processing status. If set to zero (0), the request was processed successfully. Otherwise, there was an error. See the message property for a description of the error. |
internal-code | If job processing status indicates an error (a value other than 0), this property contains the internal service routine return code. Otherwise, this property is omitted. |
message | If job processing status indicates an error (a value other than 0), this property contains a description of the error. Otherwise, this property is omitted. |
Job file document
Table 4 shows the contents of the JSON job file document.
Property | Description |
---|---|
jobname | Job name. |
recfm | Record format of the file. The first character
of the returned string is one of the following:
One or more subsequent characters might also be
present in the returned string (in this order):
Generally, the B (blocked) and S (standard or spanned) characters are not present for JES spool files. Also, the M (machine) and A (ASA) characters are mutually exclusive. |
byte-count | Number of bytes on spool consumed by the spool file. The value can be zero (0). This field is integer data type. |
record-count | Number of records in the spool file. The value can be zero (0). This field is integer data type. |
job-correlator | Job correlator. If this value is null, the job was submitted to JES3. |
class | Class that is assigned to the spool file. |
jobid | Job ID. |
id | Data set number (key). This field is integer data type. |
ddname | DDNAME for the data set creation. |
records-url | Resource URL for retrieving the spool file contents for the job. |
lrecl | Specifies the length, in bytes, for fixed-length records and the maximum length for variable-length records. |
subsystem | The primary or secondary JES subsystem. If the value is null, the job was processed by the primary subsystem. |
stepname | Step name for the step that created this data set. The value can be null. |
procstep | Procedure name for the step that created this data set. The value can be null. |
Job step data document
Table 5 shows the contents of the JSON job step data document.
Property | Description |
---|---|
active | Value is set to true if the step is running. Otherwise, the value is false. |
smfid | The SMF ID of the system where the step is running. |
step-number | Step number. |
selected-time | Date and time the step started.Not returned if the step is still active. |
owner | The z/OS user ID associated with the job. |
program-name | Name of the program to be run by the job step. This value is retrieved from the EXEC statement. |
step-name | Name specified for the step on the EXEC statement. |
path-name | Path to the program in the z/OS UNIX System Services (z/OS UNIX) file system that is run by the job step. Not returned if the step is active. |
substep-number | Step number in the sequence of steps that run z/OS UNIX programs. Not returned if the step is still active. |
end-time | Date and time the step completed. Not returned if the step is still active. |
proc-step-name | Name of the procedure to be run by the job step. This value is retrieved from the EXEC statement. |
completion={
ABENDUnnnn | ABEND Sxxx | CANCELED | CC nnnn | FLUSHED } |
Step completion code. One of the following values:
|
abend-reason-code | Abend reason code. Returned if the step is completed and an abend occurs. Not returned if the step is active. |
Error report document
Table 6 shows the contents of the JSON error report document.
Property | Description |
---|---|
category | Error category. This field is integer data type. |
rc | Return code. This field is integer data type. |
reason | Reason code. This field is integer data type. |
message | Message that describes the error. |
details | (Optional) Array of strings containing additional message details. |
For the meanings of the category, return code, and reason code fields, see Error reporting categories.