× 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.




The problem here is this is not a fresh code.
It is a code that is being converted from HP3000 RPGII to IBM RPGIII.
So, we need to perform an equivalent function on the iSeries side to
acheive the desired effects.

Since you're converting it anyway, I'd take this opportunity to do it right and convert them to externally defined print files.

What are the possible ways to acheive this?
All the printer files are program described.
How can specify the font (or equivalent for any other print escape
sequences) in program described print files?

You can specify one font that's used for the entire spooled file when you create the print file (CRTPRTF). Or change it with CHGPRTF, or override it at runtime with OVRPRTF. That's all you can do with a program-described file.

With an externally defined file, you can switch fonts whenever you like, as well as many other capabilities (graphics, barcodes, etc.) This is the better solution in the long run.

If you really MUST keep your file program described, then you have some problems to consider:

a) I believe the HP3000 was an ASCII machine. The iSeries is not, it's EBCDIC based, so your code has to output text that will be converted to the right escape codes when the EBCDIC to ASCII translation takes place.

b) While in the spool, your program-described output will most likely be stored in SCS format. Since SCS has it's own system of escape codes, the system will probably strip out any control characters (i.e. the escape character) from the string you write to the spool.

c) You can work-around the (b) problem by using a *USERASCII print file instead of the default *SCS ones. However, the iSeries spooler won't understand the format of the data, so you'll be limited in how it can be manipulated in the spool. Furthermore, if you do it this way, you'll have to send the whole document as ASCII and with all of the required escape sequences. So this is probably not an ideal solution.

d) There are ways to mark escape codes as "transparent data" by writing certain hex values to the spool. I've never been able to get them to work, but I've seen others on these lists talking about them. Might be worth looking into.

e) You can set up control codes with WSCST so that the data gets transformed with the right control characters in the right place, but this requires creating a WSCST driver with the right translation tables, etc. I've done some stuff like this, but usually it requires a lot of trial and error for me to get it right, and that makes it hard for me to explain to you how to do it.

How is your printer configured? Are you using Host Print Transform? Is it configured with LPR or JetDirect or....?

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.