IBM Support

Controlling and Troubleshooting Drawer Selection in a WSCST

Troubleshooting


Problem

This document provides information on controlling and troubleshooting the drawer selection in a modified Workstation Customizing Object (WSCST).

Resolving The Problem

Why This Document Was Written

It is often necessary to specify a specific drawer to controlling the printing of specific spooled files. You might want to specify a drawer for a specific type of spooled file, or you might want to force all spooled files sent to an output queue to be printed from one drawer only. Unfortunately, creating (and especially troubleshooting) Workstation Customizing Objects is not covered under a software maintenance agreement after a system-supplied object is modified or you have created your own program. Therefore, if you create a Workstation Customizing Object and it does not work, you will have to diagnose it yourself or use the services of a consulting contract. This document will take you though the process of implementing a workstation customizing object that forces drawer selection on a printer and will help you to troubleshoot the Workstation Customizing Object (WSCST) if it does not work.

This document was last updated on 9 July 2007.

Caution: These instructions are provided as is. Any assistance with editing the Workstation Customization Table must be done through a consulting agreement.


Determining Your Needs

You will need to decide what kind of Workstation Customizing Object that you need to create.

If you have spooled files created by multiple or unknown printer files, and you do not want to change the printer files to specify a particular source drawer, you might be best off creating a Workstation Customizing Object to force all printer output sent to a device to be printed from a specific drawer. This means that spooled files that specify source drawer 1, 2, or any other value will be printed to the same drawer.

On the other hand, if you are capable of controlling the source drawer value of your spooled files, you will be able to create one Workstation Customizing Object that can control the drawer redirection for any kind of file. As an example, spooled files that specify source drawer 1 can be forced to pull from a drawer containing ledger paper, while spooled files specifying drawer 2 will be printed on plain paper.

After you know what kind of Workstation Customizing Object you need to create, you can begin the process, which is straightforward:
1.Determine the commands to use.
2.Put the commands into a Workstation Customizing Object.
3.Attach the Workstation Customizing Object to the printer device description or output queue description.
4.Test.
5.If it fails, trace and call the printer vendor.

Determining What Commands to Use

You first have to determine which drawer you want to print from, and find the commands required to print from that drawer. This can vary depending on your printer configuration and the model of the printer. For example, an HP8000 printer might require a different command to print to "Drawer 2" than an HP4, and it might require an altogether different command to print to a drawer that has been configured for a specific paper type.

One of the best ways to determine what command to use when printing to a specific drawer is to consult the Users Guide or Technical reference for the printer.

Another way to get the information is to simply call the printer support folks and ask them. "What is the command string that I have to send down to print from tray ___ of my ________ printer?" will often elicit the proper response, but sometimes, technical support staff need to be given an example. You might have to suggest something like, "The technical reference manual says that I have to send down an ESC&n1H to pull paper from drawer 1. Are there any printer settings that would prevent this from working like the manual states?" The reason for asking this is that sometimes there are printer settings like Paper Type or Drawer Renumbering that can alter how the printer processes specific drawer commands, and you want to verify that the data string that you program into your Workstation Customizing Object should work. Then, if it does not work, you can call back later and ask them troubleshoot it.

When you are looking in the User's guide for your printer, the drawer selection commands are likely to be found by searching on the words PCL, paper source, drawer, tray, or the character &. One example of this is shown below; it was taken from page 40 of the PCL5e/PostScript Technical Reference Manual, S544-5344-03, available at IBM's Printer website. According to this page, the command to pull paper from a specific tray is <ESC>&1#H, where the # is a specified value.

FunctionCommand
Page Control
Paper Source<ESC>&l#H

# Input Source
0 Use Current Source
1 Tray 1
2 Auxiliary Tray - Manual Feed (for papers)
3 Auxiliary Tray - Manual Feed (for envelopes)
4 Auxiliary Tray (automatic)
5 Tray 2
6 Envelope feeder
7 Tray 3
8 Tray 4
9 Tray 5

For example, to pull paper from Tray 2, use 5 rather than #. The command then becomes <ESC>&l5H. After the appropriate drawer selection command is found, it must be translated into Hexadecimal values. The best way to do this is with a conversion table similar the one found in the Appendix of the OS/400 Workstation Customization Programming manual:

Table  C-1. ASCII Character Code to Hexadecimal Value Conversion Table
Second Hex Digit
First Hex Digit
0
1
2
3
4
5
6
7
0
NUL
DLE
SP
0
@
P

p
1
SOH
DC1
!
1
A
Q
a
q
2
STX
DC2
"
2
B
R
b
r
3
ETX
DC3
#
3
C
S
c
s
4
EOT
DC4
$
4
D
T
d
t
5
ENG
NAK
%
5
E
U
e
u
6
ACK
SYN
&
6
F
V
f
v
7
BEL
ETB
'
7
G
W
g
w
8
BS
CAN
(
8
H
X
h
x
9
HT
EM
)
9
I
Y
i
y
A
LF
SUB
*
:
J
Z
j
z
B
VT
ESC
+
;
K
[
k
{
C
FF
FS
,
<
L
\
l
|
D
CR
GS
-
=
M
]
m
}
E
SO
RS
.
>
N
^
n
~
F
SI
US
/
?
O
--
o
DEL

A successful translation of the <ESC>&l5H command yields: 1B266C3548. (If the characters < and > appear in the command, they are not translated.) This command must to be put into a Workstation Customizing Object where it will be translated back into ASCII at print time.


Put the Command into a Workstation Customizing Object

After you have found and translated your command, you must put it into use in a Workstation Customizing Object. For more information on creating a Workstation Customizing Object, refer to the following Rochester Support Center knowledgebase document:

N1010140: Instructions for Modifying a Workstation Customizing Object (WSCST)

When you are editing your Workstation Customizing Object source, you must find the :DWRSLT tags and make the appropriate changes to them.

 :DWRSLT
   DRAWER=PAPER
   DATA ='1B266C3248'X.
 :DWRSLT
   DRAWER=ENVELOPE
   DATA ='1B266C3668334F'X.
 :DWRSLT
   DRAWER=DRAWER1
   DATA ='1B266C3148'X.  --> '1B266C3548'X.
 :DWRSLT
   DRAWER=DRAWER2
   DATA ='1B266C3548'X.

At this time, the attributes of the spooled file must be considered. If the spooled files sent to the printer specify a Source Drawer of 1, then you must change the DRAWER1 tag. If they specify Source Drawer 2, you must change the DRAWER2 tag. If all spooled files sent to the printer are to be printed from the same drawer, then all the tags must be changed to specify the same value.

In the example above, making the specified change would force all spooled files with a Source drawer of 1 to print to Tray 2.

After changes to the Workstation Customizing Object source have been made, create the Workstation Customizing Object.


Attach the Workstation Customizing Object to the Device Description or Output Queue Description

After the Workstation Customizing Object has been created, it will need to be attached to the Device Description or Remote Output Queue Description.

To attach a Workstation Customizing Object to a Device Description, end the writer, vary off the Device Description, and use the CHGDEVPRT command to change the Workstation Customizing Object parameter to specify the appropriate Workstation Customizing Object and the Library it resides in. Then press the Enter key. After the Workstation Customizing Object has been attached, vary the Device Description back on and start the writer.

To attach a Workstation Customizing Object to a Remote Output Queue, end the writer, and prompt on the CHGOUTQ command to change the WSCST parameter, and specify the name and Library. Then press the Enter key. After the Workstation Customizing Object has been attached, the writer might or might not need to be restarted. Verify by issuing the WRKOUTQ command and seeing if the status is RLS/WTR. If not, start the writer using the STRRMTWTR command.

Test

To test your Workstation Customizing Object, send a spooled file with the proper attributes to the printer and see if it comes out of the correct drawer. If the Workstation Customizing Object was created to force spooled files with a Source drawer of 2 to print out of a certain drawer, ensure that the spooled file tested has a Source drawer of 2. Also, it is important to note that *USERASCII spooled files, identified by their Printer Device Type and the fact that their total pages show up as 1*, are not supported by a Workstation Customizing Object because they do not use it. The IBM System i products simply passes those files through to the printer without transformation.

If it Fails

If your Workstation Customizing Object fails to work properly, the correct steps to take are to trace the failure, and call the printer vendor. For additional information, refer to the following Rochester Support Center knowledgebase document:

N1019451: Communications Trace for TCP/IP Printers (R510 and Above)

Ensure to format the trace for ASCII representation, and when it is completed, search for the string that you specified in your Workstation Customizing Object. It might not be found all together because of line wrapping and spacing considerations, so search carefully. After you have found the command in the trace, verify that your translation of the command was proper. It is common to confuse "1" with "l" when converting, so double-check to be sure that your translation was precise. If it was, you can call the vendor and ask them why the proper command was received by their printer, but not processed correctly. You should be able to e-mail or FAX a communications trace to their technical support group for analysis if necessary.

If you do not find the command in your trace, double-check your work. Verify that your translation was correct. Verify that the correct Workstation Customizing Object and library are specified in your Device Description or Remote Output Queue Description. If your printer is set up as a Device Description, ensure that your PPRSRC1 and PPRSRC2 parameters are setup using *LETTER and not *CONT. A Device Description that specifies continuous paper will not properly process a Workstation Customizing Object that specifies drawer selection.

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"6.1.0"}]

Historical Number

25335237

Document Information

Modified date:
18 December 2019

UID

nas8N1019423