IBM Support

Printing Binary ASCII Print Data through an IBM i System

Troubleshooting


Problem

This document discusses how to print binary ASCII print data on an ASCII laser printer through the IBM i System using a *LAN 3812 printer device description, a Remote Output Queue (RMTOUTQ), or a PC5250 or TN5250 printer session. This can be used to send any type of binary ASCII data (including, but not limited to, PCL, PostScript, and PDF); however, they require that the target printer have direct support for that specific type of print data.

Resolving The Problem

This document discusses how to print binary ASCII print data on an ASCII laser printer through the IBM i System using a *LAN 3812 printer device description, a Remote Output Queue (RMTOUTQ), or a PC5250 or TN5250 printer session.

There are a few different methods to generate a *USERASCII spooled file on the iSeries from the PCL data that they have on the PC:

oUsing Line Printer Requester (LPR) to send binary print data to a specific output queue
oUsing File Transfer Protocol (FTP) to send binary print data to a *USERASCII printer file
oCopying binary print data to an IBM i NetServer print share

Note: These methods can be used to send any type of binary ASCII data. This includes, but is not limited to, PCL (Printer Control Language), PDF (Portable Document Format), PostScript, and TIFF. However, they require that the target printer has direct support for the specific type of print data being sent.

Using Line Printer Requester (LPR) to send binary print data to a specific output queue

oOpen a Windows Command Prompt and use the CD command to connect to the directory where the binary file is stored. For example:

cd "C:\Documents and Settings\Administrator\My Documents"
oUse the Windows Line Printer Requester (LPR) command to send the print data in binary mode to a specific output queue on your IBM i System. Some examples include:

lpr -S S1012345 -P PRT05 -o l pcfile.prn

where S1012345 is the name of the IBM i System, PRT05 is the name of the printer and output queue, and pcfile.prn is the name of the file containing the ASCII printer data stream.

Using File Transfer Protocol (FTP) to send binary print data to a *USERASCII printer file

Use the WIndows File Transfer Protocol (FTP) command to send the print data in binary mode to a *USERASCII printer file. This can be done using the QPTMPLPD printer file in library QUSRSYS, which is the same printer file using by the Line Printer Daemon (LPD) job on the IBM i. For example:

ftp <host-name>
cd qusrsys
binary
put <pc-filename> qptmplpd
quit

or you can create a printer file based on QUSRSYS/QPTMPLPD that points directly to the printer device you want to use for printing, for example:

CRTDUPOBJ OBJ(QPTMPLPD) FROMLIB(QUSRSYS) OBJTYPE(*FILE) TOLIB(QGPL)
          NEWOBJ(PRT05)

CHGPRTF FILE(PRT05) DEV(HP4200) DEVTYPE(*USERASCII) OUTQ(*DEV)
        HOLD(*NO) SAVE(*YES) USRDTA('UserASCII')

and then use FTP to sent the print data in binary mode to that specific *USERASCII printer file. For example:

ftp <host-name>
cd qgpl
binary
put <pc-filename> prt05
quit

The resulting *USERASCII spooled file can then be printed to a PCL-capable laser printer that is configured to use a *LAN 3812 printer device description, a Remote Output Queue (RMTOUTQ), or a PC5250 or TN5250 printer session. Printing the resulting *USERASCII spooled file through a *LAN IPDS printer device description would require using the optional Transform Manager portion of the Infoprint Server for iSeries product (5722IP1) to convert the *USERASCII spooled file to *AFPDS.

Note: Although it is recommend that you use a iSeries NetServer print share to print from Windows applications to an output queue on an IBM i System, it is generally easier to send binary print data to an iSeries printer using LPR or FTP, as discussed above.

Copying binary print data to an IBM i NetServer print share
1.Create an IBM i printer share

a. Use either IBM i Navigator for Windows or IBM i Navigator for Web.
b. Open Basic Operations -> Printers or Work Management -> Output Queues.
c. Right click the printer or output queue you want to share and select Sharing -> New share.
d. Take the defaults and click OK.
2.Connect a printer port to the IBM i printer share. Open a DOS command prompt and run the following command:

net use lpt3 \\systemName\shareName
3.Move the PRN file to IBM i. From the DOS command prompt, run the following command:

copy /b fileName.prn lpt3

[{"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":"7.1.0"}]

Historical Number

600318425

Document Information

Modified date:
18 December 2019

UID

nas8N1011519