READ-SPOOL

#### Search Results

Search

# READ-SPOOL

File | 12
Statement | `FIND`
Task | Read SYSOUT from spool. This view retrieves records from JES . Use the `SPOOL-FILES` view to retrieve a list of spool files relating to the specified job before executing `READ-SPOOL`.

## Fields

Dictionary Field Name | F/L | Mu | DE | Remarks
--- | --- | --- | --- | ---
`ERROR-CODE` | N3 |  |  |
`ERROR-TEXT` | A58 |  |  |
`NODE` | N5 |  | D |
`NODE-NAME` | A16 |  | D |
`JOB-NAME` | A8 |  | D | Required if `JOB-NUMBER` is blank.
`JOB-NUMBER` | N7 |  | D | Required if `JOB-NAME` is blank
`JOB-ID` | A8 |  | D | Required if `JOB-NAME` and `JOB-NUMBER` are blank.
`RECORD-NUMBER` | N7 |  | D |
`TYPE` | A2 |  | D | Required.
`RECORD-LENGTH` | N5 |  | D |
`RECORD` | A253 |  | D |
`POSITION` | B1 |  | D |
`DATA-SET-KEY` | N11 |  | D |
`SCAN` | A3 |  | D |
`SCAN-LIMIT` | N7 |  | D |
`SCAN-TYPE` | A1 |  | D |
`SCAN-LENGTH` | N3 |  | D | Only relevant if `SCAN-TYPE=A`.
`SCAN-COLUMN-FROM` | N3 |  | D | Only relevant if `SCAN-TYPE=A`.
`SCAN-COLUMN-TO` | N3 |  | D | Only relevant if `SCAN-TYPE=A`.
`TIME-LIMIT` | N5 |  | D |
`DATA-SET` | N5 |  | D |
`SEGMENT-NUMBER` | N3 |  | D |
`SEGMENT-LENGTH` | N3 |  | D |

## Relevant Error Codes

Code | Text
--- | ---
533 | Requested number of records scanned.
537 | Time limit reached.
711 | Logical Error occurred in Common JES Interface.
712 | Request to Common JES Interface failed.
713 | Jobname and Job ID missing. One of them required.
715 | Duplicate jobnames found. Please specify job ID.
719 | Unable to :1: SYSOUT dataset.
722 | Requested dataset not found.
723 | Requested job in input queue.
724 | Requested job not found.
728 | You are not allowed to see this job.
731 | Error occurred during spool get.
781 | Unable to obtain storage for work area extension.
830 | JES interface is not active.

## Field Descriptions

Field Name | Type/Length
--- | ---
`DATA-SET` | (N5)

Requested dataset number (see also the `DATA-SET-KEY` field).

Field Name | Type/Length
--- | ---
`DATA-SET-KEY` | (N11)

Unique dataset identification. This offers much faster access than the dataset number. The dataset key can be obtained using the `SPOOL-FILES` view.

Field Name | Type/Length
--- | ---
`JOB-NAME` | (A8)

Name of job. If you do not specify a job name, you must specify the `JOB-NUMBER` field.

Field Name | Type/Length
--- | ---
`JOB-ID` | (A8)

Job number in alphanumeric format.

Field Name | Type/Length
--- | ---
`JOB-NUMBER` | (N7)

Job number assigned by the spooling system. If you do not specify a job number, you must specify the `JOB-NAME` field.

Field Name | Type/Length
--- | ---
POSITION | (B1)

Offset in spool record (the `RECORD` field contains spool record starting at this offset).

Field Name | Type/Length
--- | ---
`RECORD` | (A253)

Spool record to be searched (see also the `POSITION` field).

Field Name | Type/Length
--- | ---
`RECORD-LENGTH` | (N5)

Length of entire spool record (not the segment length).

Field Name | Type/Length
--- | ---
`RECORD-NUMBER` | (N7)

Relative record number from start of dataset.

Field Name | Type/Length
--- | ---
`SCAN` | (A3)

If you specify `YES`, the first record which meets the selection criteria and all subsequent records are returned.

Field Name | Type/Length
--- | ---
`SCAN-COLUMN-FROM` | (N3)

Specifies the column number where the scan is to start. Default is column 1.

Note
Only relevant if `SCAN-TYPE=A`.

Field Name | Type/Length
--- | ---
`SCAN-COLUMN-TO` | (N3)

Specifies the column number where the scan is to end. Default is the end of the record. Only relevant if `SCAN-TYPE=A`.

Field Name | Type/Length
--- | ---
`SCAN-LENGTH` | (N3)

Specifies how much of the string in the `RECORD` field is to be scanned. Only relevant if `SCAN-TYPE=A`.

Field Name | Type/Length
--- | ---
`SCAN-LIMIT` | (N7)

Maximum number of records to be scanned before a record is found that matches the search criteria. If this limit is reached and no matching record is found, `ERROR-CODE` `533` with the appropriate text is returned.

Field Name | Type/Length
--- | ---
`SCAN-TYPE` | (A1)

Specify `A` for an absolute search. Note that wildcard symbols (* and _) are then treated as normal characters.

Field Name | Type/Length
--- | ---
`SEGMENT-LENGTH` | (N3)

Length of segment of spool record. If this field is not specified or zero, only the first segment will be returned, even if the spool record is longer than the `RECORD` area.

Field Name | Type/Length
--- | ---
`SEGMENT-NUMBER` | (N3)

Segment number of spool record to be retrieved, if the output is segmented.

Segment number within record.

Field Name | Type/Length
--- | ---
`TIME-LIMIT` | (N5)

Specifies the maximum number of seconds that a record can be scanned. If this limit is exceeded and no match is found, `ERROR-CODE` `537` is returned.

Field Name | Type/Length
--- | ---
`TYPE` | (A2)

Spool dataset type. Possible values:

`AL` | Read all SM/SO files as one file.
`CC` | Summary of job steps and completion codes.
`JL` | Input JCL.
`SI` | `SYSIN` data.
`SM` | System messages.
`SO` | `SYSOUT` data.

## Default Order of Data Returned

Records are returned in order from the start of the `SYSOUT` data set.

### On this page

- Fields
- Relevant Error Codes
- Field Descriptions
- Default Order of Data Returned