Using LPD to Print ASCII Files
A possible use of LPD is to printASCII files received from systems running
LPR-to-ASCII workstation printers that are attached to the AS/400 in one of the
following ways:
vASCII workstation controllers.
vNWS (Nonprogrammable workstation) printer ports.
vPWS (Programmable Workstation) serial ports.
This is useful for situations where a programmable workstation does not have its
own printer attached. Youcan also use it from any ASCII system that is running
LPR.

OS/2 TCP/IP—Example

The following is the syntax of the LPR command on OS/2 TCP/IP that prints file
CONFIG.SYS directly to printer WSPRT9 on AS/400 RCHASM03:
lpr config.sys -p WSPRT9 -s RCHASM03
Additionally, an LPD server must be started on RCHASM03, and WSPRT9must be
a printer of the type described previously.The file arrives with a sending user ID of
PC-USER and is processed according to Figure 228on page 371.
Note: Because the spooled file is still an ASCII file, you cannot display the file on
the AS/400 system while it is on the print queue.
Using LPD to Print ASCII Files Converted to EBCDIC
Another use of LPD is to receive printer files from ASCII hosts running LPR and
print them in EBCDIC. There are some limitations on character conversion,
however. TheASCII hosts must be able to convert the printer data stream to
EBCDIC before sending it using LPR.
Todo this, you need to customize the LPD printer file on the AS/400. Full details
are given in the commentary to the code in the example shown in Figure 229on
page 375.
Do not change the original printer file in QTCP.Instead, make a copy of it, change
the copy, and include it higher up the user library list portion of the *LIBLfor the
user profile receiving the file.
There are two options for changing the LPD printer file:
1. Change the QUSRSYS/QPTMPLPD working copy from *USERASCII to *SCS. This
affects all LPR clients because it resides in the *SYSLIBL path and is found first
by all user profiles. This means that all LPR clients must send EBCDIC data
streams (or at least only send EBCDIC streams until the
QUSRSYS/QPTMPLPD printer file is restored to *USERASCII type).
2. Change the QUSRSYS/QPTMPLPD working copy from *USERASCII to *SCS, and
move it to another library that is your *CURLIB or somewhere in your *USRLIBL
path. Ensure that your target library is found ahead of library QTCP,which has
the installation copy of the printer file. Youmust also ensure that the target
library is unique to your user profile, *LIBL, in order to avoid affecting other
users.
Chapter12. Line Printer Daemon (LPD) 373