Ask the Expert

Bundling multiple one-page reports from IBM i into single document

Our iSeries application generates one page renewal notices but there are tens of thousands of one page reports. All these reports are in iSeries output queue. Is these any software that could bundle all these one page reports to one job for the LAN printer? Instead of one page reports, we want printer to receive one job that would have all one page reports.

If you know any software or idea how to address this issue, please let me know.

I'm not really clear if the final printer destination in on the iSeries or not, but the basic idea is the same. The first thing we have to do is obviously combine all of the separate spooled files into a single spooled file. This would involve these steps:
  • Create a PF with a record length of at least 134 characters (assuming that none of the spooled files are wider than the standard 132 characters)
  • Use the CPYSPLF command for each file in the output queue, copying the spooled file into the PF with the options MBROPT(*ADD) CTLCHAR(*FCFC).
  • Issue an OVRPRTF command against an existing PRTF definition, being sure to specify CTLCHAR(*FCFC) OVRSCOPE(*JOB)
  • Use the CPYF command: CPYF FROMFILE() TOFILE()

If the new combined spooled file can be printed on the AS/400, then it can be routed to the desired output queue and released. If it needs to be printed on a LAN printer, then you would probably be best off converting it to a PDF using one of the many choices on the iSeries for PDF creation.

The trickiest part of this might be getting the list of spooled files in a particular output queue.

This was first published in December 2009

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: