|
Here is the source: * PRTF TESTPRT A R RCD1A A FLD1A 18 1 A SPACEA(001) A R RCD1B A FLD1B 18 1 A SPACEA(001) A R RCD2A A FLD2A 18 3 A SPACEA(001) A R RCD2B A FLD2B 18 3 A SPACEA(001) A R RCD3A A FLD3A 18 5 A SPACEA(001) A R RCD3B A FLD3B 18 5 A SPACEA(001) * RPGLE TESTPRT1 Ftestprt o e printer C eval fld1a = 'Entering program 1' C write rcd1a C call 'TESTPRT2' C eval fld1b = 'Leaving program 1' C write rcd1b C eval *inlr = *on * RPGLE TESTPRT2 Ftestprt o e printer C eval fld2a = 'Entering program 2' C write rcd2a C call 'TESTPRT3' C eval fld2b = 'Leaving program 2' C write rcd2b C eval *inlr = *on * RPGLE TESTPRT3 Ftestprt o e printer C eval fld3a = 'Entering program 3' C write rcd3a C eval fld3b = 'Leaving program 3' C write rcd3b C eval *inlr = *on This was executed using the following commands from a command line: OVRPRTF TESTPRT SHARE(*YES) CALL TESTPRT1 Ba-da-boom! Entering program 1 Entering program 2 Entering program 3 Leaving program 3 Leaving program 2 Leaving program 1Even turning on LR did not have a bad effect - but this might be something to look at in slightly different circumstances.
Hope this is useful for someone. Vern At 06:13 AM 2/28/2006, you wrote:
Hi Scott, Since each program has its own printer file and assuming that they are external printer files with different formats/fields, the print can not be combined using a simple override. You can achieve the same results by copying the spool files to a database file and printing from the database file. For example (and this is by memory without a manual for command syntax): PgmA - crtpf qtemp/splf rcdlen(199)- ovrprtf *prtf hold(*yes) save(*yes) . . .- call PgmB- cpysplf PrtfB qtemp/splf job(*) splnbr(*last) prtctl(*FCFC)- dltsplf PrtB job(*) splnbr(*last)- call Pgm C - cpysplf PrtfC qtemp/splf job(*) splnbr(*last) prtctl(*FCFC)- dltsplf PrtC job(*) splnbr(*last)- dltovr *prtf - ovrprtf qprint prtctl(*fcfc)- cpyf qtemp/splf qprint I hope this helps Joe Kempenich --- On Mon 02/27, Scott Johnson < sjohnson@xxxxxxxxxxxxxxx > wrote:From: Scott Johnson [mailto: sjohnson@xxxxxxxxxxxxxxx]To: MIDRANGE-L@xxxxxxxxxxxxxxxx: Mon, 27 Feb 2006 18:22:16 -0600Subject: Multiple Programs to One Spool FileNot sure if this is possible or not. I want to have multiple programs in one job stream print to the same spool file. Each program has its own prtf. Each prtf has different records/layouts. More or less, I have a report program that calls separate programs for the first page(s) and last page(s) of the needed report. The report program itself provides the detail for the middle pages. I am pretty sure I have to use ovrprtf, but I am unsure of where to place them and with what parms.PgmA calls PgmB.PgmB uses PrtfB and prints to spool file.Control return!sto PgmA.PgmA uses PrtfA and prints to spool file.PgmA calls PgmC.PgmC uses PrtfC and prints to spool file.Control returns to PgmA.PgmA ends.-- ThanksScott-- This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing listTo post a message email: MIDRANGE-L@xxxxxxxxxxxxxx subscribe, unsubscribe, or change list options,visit: http://lists.midrange.com/mailman/listinfo/midrange-lor email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx posting, please take a moment to review the archivesat http://archive.midrange.com/midrange-l._______________________________________________ No banners. No pop-ups. No kidding. Make My Way your home on the Web - http://www.myway.com -- This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
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.