SPOOLREAD
The SPOOLREAD command obtains the next record from the system spooler.
Options
- INTO(data-area)
- specifies the data area for the variable-length data. It is a receiver field.
- MAXFLENGTH(data-value)
- specifies, as a fullword binary variable, the maximum length of data transferred. This is set by the user on input. The limit of length is 32 760 bytes. This is the maximum size of the CICS® buffer used to read a record.
- TOFLENGTH(data-area)
- specifies, as a fullword binary variable, the length of the data that is transferred. This is set by CICS on input. It is optional and, if it is omitted, you are not notified of the actual length of the data received.
- TOKEN(data-area)
- specifies the 8-character CICS-allocated token used to identify a report.
Restriction: You must specify the RESP or NOHANDLE option
on the EXEC CICS SPOOLREAD command.
Conditions
Note: There are no default
actions.
- 85 ALLOCERR
- occurs
in any of the following situations:
- Dynamic allocation has rejected a request to allocate an input
data set.
RESP2 gives the dynamic allocation response code that denotes this error. The first two characters are the information reason code (S99INFO), and the second two are the error reason code (S99ERROR), as defined in the z/OS®: MVS™ Programming: Authorized Assembler Services Guide, SA22-7608.
- Dynamic allocation has rejected a request to allocate an input
data set.
- 20 ENDFILE
- occurs
in any of the following situations:
- All data for the current spool file being read has been retrieved. You should proceed to issue a SPOOLCLOSE command as soon as possible, to release the lock on the JES single thread, and to terminate current SYSOUT data set processing.
- 21 ILLOGIC
- RESP2
values:
- 3
- Invalid CLASS value specified.
- 16 INVREQ
- RESP2
values:
- 4
- Unsupported language.
- 8
- Unsupported function.
- 12
- Read attempt after end of file.
- 24
- INTO missing.
- 40
- Subsystem interface already enabled. Note: Errors 1024 and over are internal, and should not occur. If one of these error codes is returned, contact your IBM® support center.
- 22 LENGERR
- occurs
in any of the following situations:
- You provided insufficient buffer space to read your record, or
you requested more than the maximum allowable buffer size of 32 760
bytes (the size of a CICS buffer
used to read a record). If the buffer space is too small, it receives
as much data as possible. The amount of data truncated is then placed
in the RESP2 field. If the TOFLENGTH operand is specified, the actual
length of the record is placed here. Note: In the event of a length error due to insufficient buffer space, the next record is not read until the error has been corrected and the current record reread.
RESP2 indicates the amount of data truncated, or shows zero if the MAXFLENGTH field is greater than the maximum allowable buffer size 32 760 bytes.
- You provided insufficient buffer space to read your record, or
you requested more than the maximum allowable buffer size of 32 760
bytes (the size of a CICS buffer
used to read a record). If the buffer space is too small, it receives
as much data as possible. The amount of data truncated is then placed
in the RESP2 field. If the TOFLENGTH operand is specified, the actual
length of the record is placed here.
- 80 NOSPOOL
- RESP2
values:
- 4
- No subsystem present.
- 8
- Interface being disabled; CICS is quiescing.
- 12
- Interface has been stopped.
- 42 NOSTG
- occurs
in any of the following situations:
- A GETMAIN has failed within the JES interface subtask (DFHPSPSS).
RESP2 gives the GETMAIN register 15 return code.
- A GETMAIN has failed within the JES interface subtask (DFHPSPSS).
- 13 NOTFND
- RESP2
values:
- 4
- No data sets could be located for retrieval for the specified external writer name.
- 19 NOTOPEN
- RESP2
values:
- 8
- Data set has not been opened.
- 12
- Attempt to read an output file.
- 1024
- Subtask OPEN macro failure.
- 88 SPOLBUSY
- RESP2 values:
- 4
- Interface already in use by another task.
- 8
- Interface already in use by current task.
Also occurs (RESP2 not set) in any of the following situations:- The JES/input single thread within the JES interface was not available.
- 89 SPOLERR
- occurs
in any of the following situations:
- The subsystem interface macro (IEFSSREQ) has failed. No input
data set name was selected.
RESP2 gives the 'IEFSSREQ' response code.
- The subsystem interface macro (IEFSSREQ) has failed. No input
data set name was selected.
- 86 STRELERR
- occurs
in any of the following situations:
- A FREEMAIN has failed within the JES interface subtask (DFHPSPSS).
RESP2 gives the FREEMAIN register 15 return code.
- A FREEMAIN has failed within the JES interface subtask (DFHPSPSS).