DOCUMENTATION NTi

ListSpooledFiles() method

Description

The ListSpooledFiles method is used to retrieve a list of spool files available on the system, based on the filters provided.
It returns a list of objects of type SpooledFile containing information such as the spool file name, job name, and other details.

Syntax

ListSpooledFiles(string filterOutqueue = "*ALL", string filterUser = "*ALL", string filterFormType = "*ALL", string filterUserData = "*ALL")

Parameters

Name Type Description
filterOutqueue string Filter by output queue to query (default *ALL).
filterUser string Filter by user (default *ALL).
filterFormType string Filters by form type (default *ALL).
filterUserData String Filter on user data (default *ALL).

Return

Returns a list of objects of type SpooledFile which contains information about each spooled file retrieved.

SpooledFile Class

Property Type Description
FileName string Name of the spool file.
JobName string Name of the job that generated the spool file.
UserName string Name of the user who ran the job.
JobNumber string Number of the job that generated the spool file.
SpooledFileNumber int Unique number of the spool file.
OutQueueName string Name of the output queue containing the spool file.
OutQueueLibraryName string Name of the library containing the output queue.
Device string Name of the output device.
UserSpecifiedData string Data specified by the user for this spool file.
Status string Current state of the spool file (e.g. *PRINT, *HOLD, etc.).
TotalPages int Total number of pages in the spool file.
CurrentPage int Current page being printed or processed.
CopiesLeft int Number of copies remaining to be produced.
FormType string Type of form required for printing.
Priority string Priority of the spooled file in the output queue.
DateOpened string Date the file was opened (created).
TimeOpened string Time the file was opened (created) .
DateTimeOpened DateTime Combined date and time of file creation.
InternalJobID byte[] Internal job identifier.
InternalSpooledFileID byte[] Internal identifier of the spool file.
DeviceTupe string Type of device used for output.
DateLastUsed string Date the file was last used.
DateTimeLastUsed DateTime Date last used.
FileSizeMultiplier int Spool file size multiplier.
FileSize int Current size of the spool file.
Asp int Auxiliary storage pool associated with the spool file.
JobSystemName string System name for the job.
AspDeviceName string Name of auxiliary storage device.
DateCreatedUTC string Date of creation in UTC.
TimeCreatedUTC string Creation time in UTC.
DateTimeCreatedUTC DateTime Combined date and time of creation in UTC.

Exceptions

No specific exceptions for this method.

Examples of use

var spooledFiles = conn.ListSpooledFiles(« *ALL », « USER ») ; 
foreach (var spooledFile in spooledFiles) 
{ 
    Console.WriteLine($« Spool File : {spooledFile.FileName}, Job : {spooledFile.JobName}, Pages : {spooledFile.TotalPages} ») ; 
}

References

For more information on the QUSLSPL API, see the official IBM documentation.