× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Wed, 9 Mar 2005, Scott Klement wrote:

I have an RPG program that creates postscript. I need to send it unchanged to a printer. I can't use a print file because that will then send an SCS print job and that won't work. Any ideas on how to do this?

The way I like to do it is generate the PostScript file as a stream file in the IFS. The IFS APIs will automagically do the ASCII to EBCDIC translatation for me. Then, if I want to debug things, I can easily NFS/SMB mount my IFS and open the stream file with my favorite text editor, or even use ghostview to see what it looks like.


You're correct that if you specify DEVTYPE(*SCS) the system will send an SCS print job to the printer. But if you specify DEVTYPE(*USERASCII) the data will be sent to the printer without any changes.

When I'm ready to print it, I re-open the stream file in my RPG program, this time in binary mode (so no translation takes place) and read fixed-length chunks of data (the length matches that of my print file) and write the results to the *USERASCII print file.

Ok, I've done the above and it is working very well. We have been printing the resulting *USERASCII print file using lp5250d. Now we have a postscript capable network printer (we have been using a PS printer directly attached to a linux box). We want to configure an outqueue on the iSeries that will print the *USERASCII printfile on this network printer. The printer that we have is an IBM Infoprint 1422. We can't seem to make an appropriate device description for it. It is connected only via ethernet. The printer does not do *SCS or *IPDS since we only want to print this *USERASCII file on it. Any help?


James Rich

It's not the software that's free; it's you.
        - billyskank on Groklaw

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.