TechTalk: Combining Spool Files in S36EE

Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

From: Barry Jones

To: All

I have an application that sends batches of inventory transaction data to a batch processor program throughout the day, but I want the audit report to print at night, and I want all the batches in one spool entry instead of in separate ones that waste paper.

The catch is that these are S36EE programs. I've read in the knowledge base that one can write a dummy RPG/400 program that simply opens a print file under user control, then returns without setting on LR, leaving the file open.

My idea is to create a copy of the QSYSPRT printer file, which is basically a "formatless" file, open that file using the dummy program, and then override my RPG II print file to the dummy one and have it continuously spool there.

Then, at 11:30 p.m. or so, I could close the print file and start printing.

Does anyone have any ideas why this wouldn't work?

From: Pete Hall

To: Barry Jones

S36EE jobs use a printer file in library #LIBRARY with the same name as the mapped S36EE printer device (e.g., P1, P2). Your override should be to this file, and you must specify SHARE(*YES).

Be aware that overrides are in effect only for the job in which they are issued. If you are trying to combine output from several jobs, consider this alternate technique:

1. Create a dummy printer file in #LIBRARY based on one already there (call it printer "PX," for instance).

2. Use the Create Output Queue (CRT-OUTQ) command to create an output queue with the same name.

3. Change the printer file to send its output to that output queue with the Change Printer File (CHGPRTF) command.

4. Send your printer output to that file with a //PRINTER OCL command.

5. To print, attach that output queue to a real printer using the Change Writer (CHGWTR) command.

If you need to combine all of the printed output into one spool file entry, copy all of these spooled files off of the dummy output queue with the Copy Spooled Files (CPYSPLF) command, and then copy them back to an active output queue with the Copy File (CPYF) command.

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  •  

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: