Printer attributes

System Object Access uses iSeries™ APIs to retrieve attributes for printer objects.

A printer is a “logical” object that is actually a combination of a device description, a writer, and an output queue. The attributes and their possible values are as follows.

CWBSO_PRT_AdvancedFunctionPrinting
Whether the printer device supports Advanced Function Printing™ (AFP™).
*NO
The printer device does not support Advanced Function Printing.
*YES
The printer device supports Advanced Function Printing.
CWBSO_PRT_AllowDirectPrinting
Whether the printer writer allows the printer to be allocated to a job that prints directly to a printer.
*NO
Direct printing is not allowed
*YES
Direct printing is allowed.
CWBSO_PRT_BetweenCopiesStatus
Whether the writer is between copies of a multiple copy spooled file. The possible values are Y (yes) or N (no).
CWBSO_PRT_BetweenFilesStatus
Whether the writer is between spooled files. The possible values are Y (yes) or N (no).
CWBSO_PRT_ChangesTakeEffect
The time at which the pending changes to the writer take effect. Possible values are:
*NORDYF
When all the current eligible files are printed.
*FILEEND
When the current spooled file is done printing.
blank
No pending changes to the writer.
CWBSO_PRT_CopiesLeftToProduce
The number of copies that are left to be printed. This field is set to 0 when no file is printing.
CWBSO_PRT_CurrentPage
The page number in the spooled file that the writer is currently processing. The page number shown may be lower or higher than the actual page number being printed because of buffering done by the system. This field is set to 0 when no spooled file is printing.
CWBSO_PRT_Description
The text description of the printer device.
CWBSO_PRT_DeviceName
The name of the printer device.
CWBSO_PRT_DeviceStatus
The status of the printer device. Possible values are the same as the device status that is returned by the Retrieve Configuration Status (QDCRCFGS) API.
CWBSO_PRT_EndAutomatically
When to end the writer if it is to end automatically.
*NORDYF
When no files are ready to print on the output queue from which the writer is selecting files to be printed.
*FILEEND
When the current spooled file has been printed.
*NO
The writer will not end, but it will wait for more spooled files.
CWBSO_PRT_EndPendingStatus
Whether an End Writer (ENDWTR) command has been issued for this writer. Possible values are:
N
No ENDWTR command was issued.
I
*IMMED: The writer ends as soon as its output buffers are empty.
C
*CNTRLD: The writer ends after the current copy of the spooled file has been printed.
P
*PAGEEND: The writer ends at the end of the page.
CWBSO_PRT_FileName
The name of the spooled file that the writer is currently processing. This field is blank when no file is printing.
CWBSO_PRT_FileNumber
The number of the spooled file that the writer is currently processing. This field is set to 0 when no spooled file is printing.
CWBSO_PRT_FormsAlignment
The time at which the forms alignment message will be sent. Possible values are:
*WTR
The writer determines when the message is sent.
*FILE
Control of the page alignment is specified by each file.
CWBSO_PRT_FormType
The type of form that is being used to print the spooled file. Possible values are:
*ALL
The writer is started with the option to print all spooled files of any form type.
*FORMS
The writer is started with the option to print all the spooled files with the same form type before using a different form type.
*STD
The writer is started with the option to print all the spooled files with a form type of *STD.
form type name
The writer is started with the option to print all the spooled files with the form type you specified.
CWBSO_PRT_FormTypeNotification
Message option for sending a message to the message queue when this form is finished. Possible values are:
*MSG
A message is sent to the message queue.
*NOMSG
No message is sent to the message queue.
*INFOMSG
An informational message is sent to the message queue.
*INQMSG
An inquiry message is sent to the message queue.
CWBSO_PRT_HeldStatus
Whether the writer is held. The possible values are Y (yes) or N (no).
CWBSO_PRT_HoldPendingStatus
Whether a Hold Writer (HLDWTR) command has been issued for this writer. Possible values are:
N
No HLDWTR command was issued.
I
*IMMED: The writer is held as soon as its output buffers are empty.
C
*CNTRLD: The writer is held after the current copy of the file has been printed.
P
*PAGEEND: The writer is held at the end of the page.
CWBSO_PRT_JobName
The name of the job that created the spooled file which the writer is currently processing. This field is blank when no spooled file is printing.
CWBSO_PRT_JobNumber
The number of the job that created the spooled file which the writer currently is processing. This field is blank when no spooled file is printing.
CWBSO_PRT_MessageKey
The key to the message that the writer is waiting for a reply. This field will be blank when the writer is not waiting for a reply to an inquiry message.
CWBSO_PRT_MessageQueueLibrary
The name of the library that contains the message queue.
CWBSO_PRT_MessageQueueName
The name of the message queue that this writer uses for operational messages.
CWBSO_PRT_MessageWaitingStatus
Whether the writer is waiting for a reply to an inquiry message. The possible values are Y (yes) or N (no).
CWBSO_PRT_NextFormType
The name of the next form type to be printed. Possible values are:
*ALL
The writer is changed with the option to print all spooled files of any form type.
*FORMS
The writer is changed with the option to print all the spooled files with the same form type before using a different form type.
*STD
The writer is changed with the option to print all the spooled files with a form type of *STD.
form type name
The writer is changed with the option to print all the spooled files with the form type name you specified.
blank
No change has been made to this writer.
CWBSO_PRT_NextFormTypeNotification
The message option for sending a message to the message queue when the next form type is finished. Possible values are:
*MSG
A message is sent to the message queue.
*NOMSG
No message is sent to the message queue.
*INFOMSG
An informational message is sent to the message queue.
*INQMSG
An inquiry message is sent to the message queue.
blank
No change is pending.
CWBSO_PRT_NextOutputQueueLibrary
The name of the library that contains the next output queue. This field is blank if no changes have been made to the writer.
CWBSO_PRT_NextOutputQueueName
The name of the next output queue to be processed. This field is blank if no changes have been made to the writer.
CWBSO_PRT_NextSeparatorDrawer
This value indicates the drawer from which to take the separator pages if there is a change to the writer. Possible values are:
*FILE
Separator pages print from the same drawer that the spooled file prints from. If you specify a drawer different from the spooled file that contains colored or different type paper, the page separator is more identifiable.
*DEVD
Separator pages print from the separator drawer that is specified in the printer device description.
empty string
No pending change to the writer.
1
The first drawer.
2
The second drawer.
3
The third drawer.
CWBSO_PRT_NextSeparators
The next number of separator pages to be printed when the change to the writer takes place. Possible values are:
*FILE
The number of separator pages is specified by each file.
empty string
No pending change to the writer.
number of separators
The number of separator pages to be printed.
CWBSO_PRT_NumberOfSeparators
The number of separator pages to be printed. Possible values are:
*FILE
The number of separator pages is specified by each file.
Number of separators
The number of separator pages to be printed.
CWBSO_PRT_OnJobQueueStatus
Whether the writer is on a job queue and, therefore, is not currently running. The possible values are Y (yes) or N (no).
CWBSO_PRT_OutputQueueLibrary
The name of the library that contains the output queue from which spooled files are selected for printing.
CWBSO_PRT_OutputQueueName
The name of the output queue from which spooled files are being selected for printing.
CWBSO_PRT_OutputQueueStatus
The status of the output queue from which spooled files are being selected for printing. Possible values are:
H
The output queue is held.
R
The output queue is released.
CWBSO_PRT_PrinterDeviceType
The type of the printer that is being used to print the spooled file. Valid values are:
*SCS
SNA (Systems Network Architecture) character stream
*IPDS
Intelligent Printer Data Stream™
CWBSO_PRT_SeparatorDrawer
Identifies the drawer from which the job and file separator pages are to be taken. Possible values are:
*FILE
The separator page prints from the same drawer that the file is printed from. If you specify a drawer different from the file that contains colored or different type paper, the page separator is more identifiable.
*DEVD
The separator pages will print from the separator drawer that is specified in the printer device description.
1
The first drawer.
2
The second drawer.
3
The third drawer.
CWBSO_PRT_StartedByUser
The name of the user that started the writer.
CWBSO_PRT_Status
The overall status of the logical printer. This field is derived from the printer device status (from the Retrieve Configuration Status QDCRCFGS API), the output queue status (from the List Printer and Writer Status and the XPF macro) and writer status (from the Retrieve Writer Information, QSPRWTRI, API). Possible values are:
1
Unavailable
2
Powered off or not yet available
3
Stopped
4
Message waiting
5
Held
6
Stop (pending)
7
Hold (pending)
8
Waiting for printer
9
Waiting to start
10
Printing
11
Waiting for printer output
12
Connect pending
13
Powered off
14
Unusable
15
Being serviced
999
Unknown
CWBSO_PRT_TotalCopies
The total number of copies to be printed.
CWBSO_PRT_TotalPages
The total number of pages in the spooled file. Possible values are:
number
The number of pages in the spooled file.
0
No spooled file is printing.
CWBSO_PRT_User
The name of the user who created the spooled file that the writer is currently processing. This field is blank when no file is printing.
CWBSO_PRT_UserSpecifiedData
The user-specified data that describe the file that the writer is currently processing. This field is blank when no file is printing.
CWBSO_PRT_WaitingForDataStatus
Whether the writer has written all the data that is currently in the spooled file and is waiting for more data. Possible values are:
N
The writer is not waiting for more data.
Y
The writer has written all the data currently in the spooled file and is waiting for more data. This condition occurs when the writer is producing an open spooled file with SCHEDULE(*IMMED) that is specified.
CWBSO_PRT_WaitingForDeviceStatus
Whether the writer is waiting to get the device from a job that is printing directly to the printer.
N
The writer is not waiting for the device.
Y
The writer is waiting for the device
CWBSO_PRT_WriterJobName
The job name of the printer writer.
CWBSO_PRT_WriterJobNumber
The job number of the printer writer.
CWBSO_PRT_WriterJobUser
The name of the system user.
CWBSO_PRT_WriterStarted
Indication of whether a writer is started for this printer. Possible values are:
0
No writer is started
1
Writer is started
CWBSO_PRT_WriterStatus
The status of the writer for this printer. Possible values are:
X'01'
Started
X'02'
Ended
X'03'
On job queue
X'04'
Held
X'05'
Waiting on message
CWBSO_PRT_WritingStatus
Whether the printer writer is in writing status. The possible values are:
Y
The writer is in writing status.
N
The writer is not in writing status.
S
The writer is writing the file separators.

System Object Access accepts a comma-separated list of printer names. Up to 100 printer names may be specified. A special value of “*ALL” may be supplied to request a list of all printers on the iSeries server.