Hi Larry,

On 7/19/2012 4:27 PM, DrFranken wrote:
The logic would have to be "Replace any 0C with 0A unless it is the VERY
last character in the print stream. In that case don't send anything
whatever."

IBM provides an example of a user-defined transform program (specified on the USRDTATFM parameter of CRTDEVPRT, et al) the IBM example is called TSPRWPR, and they provided it for the purposes of doing page-range support (on outq types that don't normally allow page ranges). It's written in C, normally available in QUSRTOOL, but there are also downloadable copies here:

http://www-01.ibm.com/support/docview.wss?uid=nas1584a2dee8678698386256624004b527e

Yours would obviously work significantly different from the IBM ones since your goal isn't to handle page range support :-)

But if you read the code, you'll see that TSPWPR is called by the print writer to transform the data, it then takes it's input (which is the input from the print writer) and passes it to the QwpzHostPrintTransform API -- so essentially, it's calling the system's built-in host print transform function.

It then takes the output of that API and returns it back (via it's parameters) to the printer writer that called it. Somewhere in there, it eliminates the unwanted pages from the page range (but you won't need to do that.)

In your case, once you have the transformed data, you will want to scan it for x'0c' characters and replace them with either x'0a' or just remove them, as needed. That's the part you'll have to figure out (but it doesn't sound hard to me.)

I wish I had an example of my own to send you... but I haven't published one (yet).

Good luck,
-SK

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.