SPOOLWRITE

The SPOOLWRITE command writes data to a spool report.

SPOOLWRITE

Read syntax diagramSkip visual syntax diagramSPOOLWRITETOKEN( data-area)FROM( data-area)FLENGTH( data-value)LINEPAGENOHANDLERESPRESP2

Conditions: ALLOCERR, INVREQ, LENGERR, NOSPOOL, NOSTG, NOTOPEN, SPOLBUSY, SPOLERR, STRELERR

Options

FLENGTH(data-value)
specifies the fullword binary variable that is to be set to the length of the data that is transferred. This is set by the user on output. It is optional and, if it is omitted, CICS® uses the length of the data area.
FROM(data-area)
specifies the data area from which to take the variable length data. The data itself is not altered in any way by CICS. FROM is a sender field.
LINE|PAGE
specifies the format of the data to be sent. The default action is LINE.

The PAGE option must be used to correctly format information for the advanced function printer (AFP) page printing devices. If a customer is creating MIXED mode type data, that is LINE records and X'5A' (AFPDS or MODCA) pagemode records, the LINE or PAGE operand must match the type record being written to spool.

TOKEN(data-area)
specifies the 8-character CICS-allocated token used to identify a report. It is a receiver on SPOOLOPEN and a sender on all other commands.
Restriction: You must specify the RESP or NOHANDLE option on the EXEC CICS SPOOLWRITE 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.

16 INVREQ
RESP2 values:
4
Unsupported language.
8
Unsupported function.
28
FROM 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:
  • The value specified in the FLENGTH parameter on a SPOOLWRITE command is not in the valid range 1 to RECORDLENGTH value specified or defaulted at the SPOOLOPEN data set. If the buffer space is too small, it receives as much data as possible.

    RESP2 contains the difference between FLENGTH and RECORDLENGTH, or zero if FLENGTH is negative or greater than 32760.

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.

19 NOTOPEN
RESP2 values:
8
Spool report has not been opened.
16
Attempt to write an input 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 the following situation:
  • The JES/input single thread within the JES interface was not available.
89 SPOLERR
occurs in the following situation:
  • The subsystem interface macro (IEFSSREQ) has failed. No input data set name was selected.

    RESP2 gives the 'IEFSSREQ' response code.

86 STRELERR
occurs in the following situation:
  • A FREEMAIN has failed within the JES interface subtask (DFHPSPSS).

    RESP2 gives the FREEMAIN register 15 return code.