SPOOLCLOSE

Close a spool report.

SPOOLCLOSE TOKEN

Read syntax diagramSkip visual syntax diagramSPOOLCLOSETOKEN( data-area)KEEPDELETENOHANDLERESPRESP2

Conditions: ALLOCERR, INVREQ, NOSPOOL, NOSTG, NOTFND, NOTOPEN, STRELERR

Description

The SPOOLCLOSE command closes a CICS® spool report and, optionally, changes its retention characteristics. If more than one transaction is trying to read reports from JES, SPOOLCLOSE should not be immediately followed by SPOOLOPEN. It should be followed by a WAIT, so that other transactions can use the interface.

A default disposition is taken if both KEEP and DELETE are omitted from the SPOOLCLOSE command, or if the report is closed implicitly by a SYNCPOINT or RETURN command:
  • When an INPUT report is explicitly closed by a SPOOLCLOSE command, the default disposition is DELETE.
  • In all other cases, the default disposition is KEEP.

Options

DELETE
For an INPUT report, DELETE specifies that the next report is to be read on the subsequent OPEN INPUT.

For an OUTPUT report, DELETE specifies that the report is to be purged.

Note: When a JCL job is submitted using the internal reader (INTRDR) with the DELETE option specified, the job is sometimes run before the output is deleted.
KEEP
For an INPUT report, KEEP specifies that the report is to be read again when SPOOLOPEN INPUT is next issued.

For an OUTPUT report, KEEP specifies that the report is to be sent to its destination node.

TOKEN(data-area)
specifies the 8-character CICS-allocated token used to identify a report.

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.

16 INVREQ
RESP2 values:
4
Unsupported language.
8
Unsupported function.
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.

13 NOTFND
RESP2 values:
1024
Input or output function has been corrupted, and SPOOLCLOSE could not complete.
19 NOTOPEN
RESP2 values:
8
Data set has not been opened.
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 SPOOLCLOSE command.