× 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 Tue, 8 Aug 2006, Pat Barber wrote:

Are you doing that with RPG programs ?

Yes.

How (short version) ?

Super short version (I'm writing up a much more useful long version):

To start we call a function called start_new_page() which:
  1. opens a temporary file in the IFS
  2. writes the postscript "header" type data to the file (this includes
     any predefined "overlay" postscript data that we've come up with
     for making the form we want to print on)
  3. returns a file "handle"

Then we do our processing almost identical to the way you would process a normal DDS print file: do page headings followed by detail lines, and reprint the headings on every page break. The only real difference is that we have to track the lines ourselves since there is no overflow indicator:
  1. call print_header() to print the headings
  2. in a loop, print the detail lines with print_dtlline()
  3. count how many lines you've printed and when you hit the max lines
     that fit on a page, then:
     a. call finish_page() that adds the necessary postscript for the
        end of the page.
     b. call start_new_page() again which begins another page (but doesn't
        create a new temporary file this time)
     c. call print_header() to print the headings on the new page

When we are all done with the print job we call finish_page() passing a varible that indicates we are finished with the job. finish_page() then adds the necessary postscript to the end (called the Trailer) and then copies the temporary file to a *USERASCII spool file.

Once the *USERASCII spool file is created we can send it to any postscript capable printer (almost every laser printer made). We have an out queue on the iseries just for this purpose.

James Rich wrote:

That is one reason why we've totally abandoned DDS, AFPDS, and IPDS in
favor of just creating postscript output.  Postscript can easily be
converted into PDFs and prints natively on almost every laser printer
without expensive add on cards.

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.