Close Spooled File (QSPCLOSP) API


  Required Parameter Group:

1 Spooled file handle Input Binary(4)
2 Error code I/O Char(*)

  Default Public Authority: *USE

  Threadsafe: No

The Close Spooled File (QSPCLOSP) API closes a spooled file opened by the Open Spooled File (QSPOPNSP) API or created by the Create Spooled File (QSPCRTSP) API. A handle, which identifies the spooled file, is returned by the QSPOPNSP and QSPCRTSP APIs. This handle is used as source to the QSPCLOSP API.

A spooled file handle is an internal number that identifies a particular spooled file. The system assigns the handle when an existing spooled file is opened using the QSPOPNSP API or when a new spooled file is created using the QSPCRTSP API. The handle is valid until the spooled file is closed or the job ends.


Authorities and Locks

None


Required Parameter Group

Spooled file handle
INPUT; BINARY(4)

The handle returned by the QSPOPNSP API or QSPCRTSP API.

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error Code Parameter.


Error Messages

Message ID Error Message Text
CPF24B4 E Severe error while addressing parameter list.
CPF3C90 E Literal value cannot be changed.
CPF3CF1 E Error code parameter not valid.
CPF33DF E Internal data area for opened spooled files destroyed.
CPF33D2 E Spooled file handle not valid.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.

API introduced: V2R2
Top | Print APIs | APIs by category