× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Just to clarify - The QPRINT in the SELECT statement doesn't refer to an
output queue, it refers to a printer file. The printer file defines the
destination output queue and a ton of other parameters.

To have the "user-specified data" (aka USRDTA) show different values for
your 3 reports, you have two options.

The easiest option would be to create a separate printer file (can be copied
from QPRINT) for each of the 3 reports and use the CHGPRTF command to set
the USRDTA value for those files to desired text ("Detail", "Summary",
"Error"). You would then change your SELECT statements to refer to the new
printer files as shown here.

SELECT PRINT-FILE1 ASSIGN TO PRINTER-DETAIL.
SELECT PRINT-FILE2 ASSIGN TO PRINTER-SUMMARY.
SELECT PRINT-FILE3 ASSIGN TO PRINTER-ERROR.

Going along with what Terry said, the output queue for those 3 printer files
can be set to the same value, so all 3 reports will show up in the same
queue.

Another option would be to use the OVRPRTF command. However, since your
program currently opens 3 output files that refer to the same printer file,
you would have to execute the OVRPRTF command for each output file from
within the COBOL program. You can do this by calling QCMDEXC to execute the
OVRPRTF prior to opening each file. This process is more cumbersome, but
would give you the ability to dynamically change the printer file
characteristics (copies, output queue, user-defined data, etc). Holler if
you need more info on how to do this.

Have fun!
Richard




-----Original Message-----
From: cobol400-l-bounces@xxxxxxxxxxxx
[mailto:cobol400-l-bounces@xxxxxxxxxxxx]On Behalf Of Michael Rosinger
Sent: Wednesday, May 16, 2007 2:50 PM
To: cobol400-l@xxxxxxxxxxxx
Subject: Re: [COBOL400-L] defining multiple printer files in ILE COBOL...


"Richard Casey" <casey_r@xxxxxxxxxxxxxxxx> wrote in message
news:mailman.5447.1179339703.13580.cobol400-l@xxxxxxxxxxxxxxx
Michael,

All you need to do is define the additional files like you showed in your
email.

Each printer file that you open will create a unique spooled file. In your
example you are referring to the same printer file (QPRINT), so your
reports
will have different file numbers.

Thanks, that makes me feel better. Following that line of thought, let's say
my program creates 3 reports: detail, summary and error. If I want to create
the 3 reports all to QPRINT as separate files and have their "user-specified
data" read Detail, Summary and Error respectively, how do I do that with the
definitions as

SELECT PRINT-FILE1 ASSIGN TO PRINTER-QPRINT.
SELECT PRINT-FILE2 ASSIGN TO PRINTER-QPRINT.
SELECT PRINT-FILE3 ASSIGN TO PRINTER-QPRINT.

I'm thinking I need to use OVRPRTF in the CL but I don't see how to make the
correlation.

--
Regards,

Michael Rosinger
Systems Programmer / DBA
Computer Credit, Inc.
640 West Fourth Street
Winston-Salem, NC 27101
336-761-1524
m rosinger at cciws dot com

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.467 / Virus Database: 269.7.1/805 - Release Date: 5/15/2007
10:47 AM



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

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.