Syntax:    SPOOLINFO (spoolID, item [,status])

Defn: A CI evaluator function that returns information about
the specified input or output spoolfile.

Type: String, integer, or Boolean depending upon item.


spoolID: Required. String identifying the target spoolfile as
"[#]Onnnn" or "[#]Innnn", where "nnnn" is a number.

Item: Required. String label specifying which information is to
be returned.

Status: Optional. CI variable name where a SPOOLINFO error number
can be returned. Zero indicates success. Non-zero indicates a
failure. Error values returned in 'status' are the same as
the CIERROR value when an error occurs. If the 'status'
parm is passed the CI will not set CIERROR and will not
report an error message. If 'status' is not specified the
CI performs its normal error handling.

Example: :calc SPOOLINFO('#O1523', "state")
Result: PRINT
Example: :calc SPOOLINFO("I349", 'restart')
Result: FALSE
Example: :calc SPOOLINFO(hplastspid, 'devClass')
Result: LP

The following table summarizes the items of the SPOOLINFO
function. The description includes the item string, one or more
aliases, the data type, and a brief description of the item.

Item String Type Description
------------ ---- --------------------------------------------
Aborted bool True if output spoolfile's $stdlist was aborted

Active bool True if input spoolfile state is 1 (active), or
output spoolfile state is 5 (transfer), 6 (print),
10 (interrupt)

ActiveDeviceName string device name working most recently on output
ActiveDev spoolfile

Broadcastable bool Used to print additional copies of SPSAVEd output

DeviceClass string Target device class or device name

DevRecSize int Record size in bytes of target device

DevSubType int Target device sub-type

DevType int Target device type

Disposition string Disposition after printing, "SAVE", "PURGE"

EnvFileName string Environment filename for output spoolfile (1)

Exist bool True if the spoolfile exists in any state

FileDesignator string Spoolfile's formal file designator name

FmtCreateDate string Spoolfile creation date formatted as: "day month
date, year" (2)

FmtCreateTime string Spoolfile's creation time formatted as: "HH:MM:SS" (2)

FormsId string Outspool file forms ID name

FormsMsg bool True means the output spoolfile has a forms
Forms alignment message associated with it

Incomplete bool True if the output spoolfile is incomplete

InputType string Type of input spoolfile, "JOB", "DATA". Returns
"" for output spoolfiles.

IntCreateDate int Spoolfile's creation date as a YYYYMMDD integer (2)

IntCreateTime int Spoolfile's creation time as a HHMMSS integer (2)

Job User Account string Spoolfile's creator's "job,user.account" name

JobName string Spoolfile's creator's job name, "" if none

JobNum string Spoolfile's creator's job/session ID, "#J|Snnn"

NumCopies int Total number of copies requested

NumCopiesDone int Total number of copies printed (completed)

NumPages int Total number of pages in the output spoolfile.
Pages Positive is accurate, negative is approximate

NumRecords int Number of records in a spoolfile which has at least
NumRecs been created

NumSectors int Number of sectors is a spoolfile which as at least
been created

Opened bool True if input spoolfile state is 0 (open), or the
output spoolfile's state is 2 (create)

OpenState string Open state of spoolfile, "OPEN", "OPEN EXCL", ""
meaning not opened

OutPriority int Output priority, 0..14

Private bool True if output spoolfile is private. All input
spoolfiles are private

Ready bool True if the input spoolfile's state is 4 (ready),
or the output spoolfile's state is 3 (defer), 4
(ready), 7 (problem), 8 (delpend), 9 (spsave)

Restart bool True if spoolfile's job is restartable

RestartPageNum int Page number to resume printing for an output

SpoolfileState string "OPEN", "ACTIVE", "CREATE", "DEFER", "READY",

User Account string Spoolfile's creator's "user.account" name

1) only valid if the system has not been rebooted since the spoolfile was

2) spoolfile must be in one of READY, CREATE, or ACTIVE states