Spooler class | QSYS API Reference Guide

Estimated reading time: 11 minutes

Provides the infrastructure to manage spooled output from print files.

Namespace: ASNA.QSys.Runtime.JobSupport Assembly: ASNA.QSys.Runtime.dll

Inheritance: Object

Methods

Signature Description
ClearQueue(String) Remove all the spool files from an output queue.
CopyFileToDatabaseFile(String, String, String, String, String, String, Boolean, SpoolerControlCharacter) Copies a Spooled File to a Database File.
CopyFileToTextWriter(String, TextWriter, String, String, String, SpoolerControlCharacter) Copies a Spooled File to a TextWriter.
CreateQueue(String) Create a new output queue.
DeleteFile(String, String, String) Delete a spool file.
DeleteQueue(String) Delete an output queue.
ExistsQueue(String) Check for the existence of an output queue.
GetNewFilePath(String) Gets the file path for a new spool file to be produced by the printer file name.
HoldFile(String, String, String) Mark a spool file to be held.
HoldQueue(String) Hold an output queue. No spool file will be printed.
MoveFile(String, String, String, String) Move a spool file to a new output queue.
PrintQueue(String) Produce a new spool file with the information about the spool files in an output queue.
ReleaseFile(String, String, String) Mark a spool file as Released so that it can be sent to a printer.
ReleaseQueue(String) Release an output queue so that printing can continue.
RenameQueue(String, String) Rename an output queue.
SaveFile(String, String, String) Mark a spool file as saved.
SetFileFormType(String, String, String, String) Set a spool file’s form type.
SetFileSaveAfter(String, String, String, Boolean) Mark a spooled file to be saved, or not, after being printed.
SetFileUserData(String, String, String, String) Set the value of the user data for a spool file.

void ClearQueue(string queueName)

Remove all the spool files from an output queue.

void ClearQueue(string queueName)

Parameters

Type Parameter name Description
String queueName The name of the output queue to be cleared.

void CopyFileToDatabaseFile(string spoolFileName, string toDatabaseFile, string job, string spoolNumber, string createdDate, string toMember, bool replaceRecords, SpoolerControlCharacter controlCharacter)

Copies a Spooled File to a Database File.

void CopyFileToDatabaseFile(string spoolFileName, string toDatabaseFile, string job, string spoolNumber, string createdDate, string toMember, bool replaceRecords, SpoolerControlCharacter controlCharacter)

Parameters

Type Parameter name Description
String spoolFileName Name of the Spooled File.
String toDatabaseFile Possibly qualified database file name [Library/]File.
String job Job ID. Use “*” for current Job otherwise “JobNumber/JobUser/JobName”.
String spoolNumber Use “*LAST” otherwise an integer number.
String createdDate Only valid value is “*ONLY”.
String toMember Name of database file Member, you can also use “*FIRST”.
Boolean replaceRecords Delete any records in the database file member prior to copying.
SpoolerControlCharacter controlCharacter Manner in which control characters will be represented in the database.

void CopyFileToTextWriter(string spoolFileName, TextWriter toTextWriter, string job, string spoolNumber, string createdDate, SpoolerControlCharacter controlCharacter)

Copies a Spooled File to a TextWriter.

Remarks

This base implentation throws a NotImplementedException exception.

void CopyFileToTextWriter(string spoolFileName, TextWriter toTextWriter, string job, string spoolNumber, string createdDate, SpoolerControlCharacter controlCharacter)

Parameters

Type Parameter name Description
String spoolFileName Name of the Spooled File.
TextWriter toTextWriter TextWriter to ‘receive’ the spoolfile text.
String job Job ID. Use “*” for current Job otherwise “JobNumber/JobUser/JobName”.
String spoolNumber Use “*LAST” otherwise an integer number.
String createdDate Only valid value is “*ONLY”.
SpoolerControlCharacter controlCharacter Manner in which control characters will be represented in the database. Defaults to None.

void CreateQueue(string queueName)

Create a new output queue.

void CreateQueue(string queueName)

Parameters

Type Parameter name Description
String queueName The name of the output queue to be created.

void DeleteFile(string spoolFileName, string jobId, string spoolNumber)

Delete a spool file.

void DeleteFile(string spoolFileName, string jobId, string spoolNumber)

Parameters

Type Parameter name Description
String spoolFileName Spool file name.
String jobId The job identifier that created the spool file.
String spoolNumber The spool file number.

void DeleteQueue(string queueName)

Delete an output queue.

void DeleteQueue(string queueName)

Parameters

Type Parameter name Description
String queueName The name of the output queue to be deleted.

bool ExistsQueue(string queueName)

Check for the existence of an output queue.

bool ExistsQueue(string queueName)

Parameters

Type Parameter name Description
String queueName The name of the output queue to be checked.

Returns

Type Description
Boolean true if the output queue exists; otherwise false.

string GetNewFilePath(string printerFile)

Gets the file path for a new spool file to be produced by the printer file name.

string GetNewFilePath(string printerFile)

Parameters

Type Parameter name Description
String printerFile The name of the printer file that will produce the spool file.

Returns

Type Description
String The file path of the spool file for the given

void HoldFile(string spoolFileName, string jobId, string spoolNumber)

Mark a spool file to be held.

void HoldFile(string spoolFileName, string jobId, string spoolNumber)

Parameters

Type Parameter name Description
String spoolFileName Spool file name.
String jobId The job identifier that created the spool file.
String spoolNumber The spool file number.

void HoldQueue(string queueName)

Hold an output queue. No spool file will be printed.

void HoldQueue(string queueName)

Parameters

Type Parameter name Description
String queueName The name of the output queue to be held.

void MoveFile(string spoolFileName, string jobId, string spoolNumber, string newQueueName)

Move a spool file to a new output queue.

void MoveFile(string spoolFileName, string jobId, string spoolNumber, string newQueueName)

Parameters

Type Parameter name Description
String spoolFileName Spool file name.
String jobId The job identifier that created the spool file.
String spoolNumber The spool file number.
String newQueueName The name of the output queue to have the spool file.

void PrintQueue(string queueName)

Produce a new spool file with the information about the spool files in an output queue.

void PrintQueue(string queueName)

Parameters

Type Parameter name Description
String queueName The name of the output queue to be printed.

void ReleaseFile(string spoolFileName, string jobId, string spoolNumber)

Mark a spool file as Released so that it can be sent to a printer.

void ReleaseFile(string spoolFileName, string jobId, string spoolNumber)

Parameters

Type Parameter name Description
String spoolFileName Spool file name.
String jobId The job identifier that created the spool file.
String spoolNumber The spool file number.

void ReleaseQueue(string queueName)

Release an output queue so that printing can continue.

void ReleaseQueue(string queueName)

Parameters

Type Parameter name Description
String queueName The name of the output queue to be released.

void RenameQueue(string queueName, string newName)

Rename an output queue.

void RenameQueue(string queueName, string newName)

Parameters

Type Parameter name Description
String queueName The name of the output queue to be renamed.
String newName The new name of the output queue.

void SaveFile(string spoolFileName, string jobId, string spoolNumber)

Mark a spool file as saved.

void SaveFile(string spoolFileName, string jobId, string spoolNumber)

Parameters

Type Parameter name Description
String spoolFileName Spool file name.
String jobId The job identifier that created the spool file.
String spoolNumber The spool file number.

void SetFileFormType(string spoolFileName, string jobId, string spoolNumber, string newFormType)

Set a spool file’s form type.

void SetFileFormType(string spoolFileName, string jobId, string spoolNumber, string newFormType)

Parameters

Type Parameter name Description
String spoolFileName Spool file name.
String jobId The job identifier that created the spool file.
String spoolNumber The spool file number.
String newFormType The new form type for the spool file.

void SetFileSaveAfter(string spoolFileName, string jobId, string spoolNumber, bool newValue)

Mark a spooled file to be saved, or not, after being printed.

void SetFileSaveAfter(string spoolFileName, string jobId, string spoolNumber, bool newValue)

Parameters

Type Parameter name Description
String spoolFileName Spool file name.
String jobId The job identifier that created the spool file.
String spoolNumber The spool file number.
Boolean newValue true to save the file after being printed; otherwise false.

void SetFileUserData(string spoolFileName, string jobId, string spoolNumber, string newUserData)

Set the value of the user data for a spool file.

void SetFileUserData(string spoolFileName, string jobId, string spoolNumber, string newUserData)

Parameters

Type Parameter name Description
String spoolFileName Spool file name.
String jobId The job identifier that created the spool file.
String spoolNumber The spool file number.
String newUserData The new value of the user data.