|
Warren, >I have multiple spool files that are generated by different programs in a >batch job. Each program generates a different type of statement for clients >(e.g. Commission statement, Tax statement etc.). After the various spool >files have been printed, they are sorted by hand, and the appropriate >statements are bundled together for a client. > >Is there an "easy" way to programmatically bundle the spool files together, >so that the contents of the spool files will be printed in the correct >sequence? There are several ways to do this. Here are three. 1. Make sure that the spooled files are produced in the batch job in the same order you want them printed. Also make sure that they have the same output priority and form type. Then just print then to an OUTQ that has SEQ(*JOBNBR) specified. If the printer writer prints them from this OUTQ it will produce then all together. 2. Change the programs to produce their output to a physical file in QTEMP. Then add a new program to the batch job that reads the data in the physical file and produces one spooled file. 3. The same as 2 above but instead of changing the programs just create the spooled files as held so they will not be printed and then use CPYSPLF with CTLCHAR(*FCFC) and MBROPT(*ADD) to copy then all to the same member of a physical file in QTEMP. Once they are all copied to the physical file member, use CPYF to copy all the data in the member to a printer file that has CTLCHAR(*FCFC) specified. Do not forget to delete all the held spooled files so the job structure can be recycled by the system. Ed Fishel +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.