SPOOLOPEN INPUT

Open a spool report.

SPOOLOPEN INPUT

Read syntax diagramSkip visual syntax diagramSPOOLOPEN INPUTTOKEN( data-area)USERID( data-value)CLASS( data-value)NOHANDLERESPRESP2

Conditions: ALLOCERR, ILLOGIC, INVREQ, NOSPOOL, NOSTG, NOTAUTH, NOTFND, NOTOPEN, OPENERR, SPOLBUSY, SPOLERR, STRELERR

Description

The SPOOLOPEN INPUT command opens a spool report for input from the system spooler to CICS®.

It prepares to get (read) an existing spool data set directly using external writer name (USERID) and specified class.

Another task could have allocated a spool file for input. In this case, you should retry after a suitable time interval.

When this command has been successfully executed, you should read the report and proceed to CLOSE as soon as possible, in order to permit other users to use the JES single thread. If SPOOLCLOSE is not issued before transaction end or SYNCPOINT, CICS performs an implicit SPOOLCLOSE KEEP, and writes a message to CSMT to alert the system programmer to the possible unnecessary retention of resources. You should not SPOOLOPEN a data set using this command until you are prepared to process it completely.

This command, if successful, returns a token, which is used later to identify the report in SPOOLREAD and SPOOLCLOSE commands.

Options

CLASS(data-value)
specifies a 1-character class designation. The CLASS operand can be used as a selection parameter for input reports. If it is omitted, the first report for the specified USERID is obtained, regardless of its class.
TOKEN(data-area)
specifies the 8-character CICS-allocated token used to identify a report.
USERID(data-value)
specifies the 8-character user identifier. It must begin with the same 4 characters as the CICS generic applid, so that CICS can check that users are not attempting to access data sets not intended for their CICS system.

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.

21 ILLOGIC
RESP2 values:
3
Invalid CLASS value specified.
16 INVREQ
RESP2 values:
4
Unsupported language.
8
Unsupported function.
16
USERID missing.
36
INPUT|OUTPUT 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.
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.

70 NOTAUTH
occurs in any of the following situations:
  • An application has issued a SPOOLOPEN INPUT command with an unauthorized USERID. For the USERID to be authorized, its first four characters must match the first four characters of the current CICS applid id.
13 NOTFND
RESP2 values:
4
No data sets could be located for retrieval for the specified external writer name; or the data set exists, but it is in HELD status.

Can also be returned if the CICS region USERID does not have ALTER access to the appropriate PROFILE in the JESSPOOL class. See the CICS RACF Security Guide for more information about RACF® authorization of JES.

1024
Input or output function has been corrupted, and SPOOLCLOSE could not complete.
19 NOTOPEN
RESP2 values:
8
Data set has not been opened or a task which has not issued the SPOOLOPEN for a spool data set has attempted to access it.
1024
Subtask OPEN macro failure.
87 OPENERR
RESP2 values:
4
A VSAM SHOWCB macro failed to return the lengths of the VSAM control blocks used to access the JES spool file.
Also occurs (RESP2 not set) in any of the following situations:
  • An internal error occurred during SPOOLOPEN processing that has forced the request to fail.
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.

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.

Restriction: You must specify the RESP or NOHANDLE option on the EXEC CICS SPOOLOPEN command.