I've seen this problem discussed, but not by anyone who actually solved it
in a CL that calls COBOL/400 programs.  I have a CLP that CALLs a COBOL/400
program multiple times in a loop.  The loop basically consists of an
OVRPRTF, a CALL to the COBOL program, and a DLTOVR.  Each iteration creates
a separate spooled file.

I'd like the report output from each iteration to go into a *single* spooled
file.  I've moved the OVRPRTF outside of the loop to before the loop gets
executed, used SHARE(*YES) and then did my iterations.  I still received
separate spooled files.

I also tried OPNSCOPE(*JOB) by itself and with OVRSCOPE(*JOB) with no
success.  I changed the COBOL program to either OPEN or CLOSE or do neither
with the printer file.  All I discovered for my trouble was that you need to
explicitly OPEN the printer file in the program in order to use it.  That
makes sense.

So if anyone has actually used CL and COBOL/400 to direct printed output
from multiple CALLs of a COBOL program into a single spooled file, please
tell me how you did it!  Thanks!

- Greg Phillips

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 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.