× 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.



Michael,

I would recommend using DDS to create a custom externally described format
(printer) file for each report, and using them. It is easy to create,
using the PDM RLU utility, or the WDSC Code Designer. That way you write to
your format file just like writing to a physical file with named fields.
QPRINT is a generic printer file for the system.

File control looks something like;

FILE-CONTROL.

* ---------------------------------------------------------------*
* Data for the report
* ---------------------------------------------------------------*
SELECT Report-Data-File
ASSIGN TO DATABASE-REPORTFILE
ORGANIZATION IS Sequential
FILE STATUS IS Report-Data-Status.

* ---------------------------------------------------------------*
* 1st Printer file for the report
* ---------------------------------------------------------------*
SELECT Print-Report1
Assign to Formatfile-PrinterFileName1(10 char max)-SI
File status is Print-Report1-Status.
* ---------------------------------------------------------------*
* 2nd printer file for the report
* ---------------------------------------------------------------*
SELECT Print-Report1
Assign to Formatfile-PrinterFileName2(10 char max)-SI
File status is Print-Report2-Status.



Data Division part

FILE SECTION.

*----------------------------------------------------------------*
FD Report-Data-File.
*----------------------------------------------------------------*
01 Report-Data-Rec.
COPY DDR-ALL-FORMATS IN REPORTFILE.

* ---------------------------------------------------------------*
FD Print-Report1.
* ---------------------------------------------------------------*
01 Print-Report-Lines.
COPY DDSR-ALL-FORMATS IN PrinterFileName1(10 char max).
* ---------------------------------------------------------------*
FD Print-Report2.
* ---------------------------------------------------------------*
01 Print-Report-Lines.
COPY DDSR-ALL-FORMATS IN PrinterFileName2(10 char max).



If you already have all your reports defined in working storage, then it
would be more work. It is great for starting a report from scratch. Define
the output in a printer file, and get it signed off from the requester/user,
then write the programming to the printer file.

Just a thought.

Jim Essinger
Senior Programmer/Analyst
GCO Servicing
(208) 452-4-9475

On 5/16/07, Michael Rosinger <mrosinger@xxxxxxxxx> wrote:

List,

It is my understanding that a typical printer file definition is something
like:

SELECT PRINT-FILE1 ASSIGN TO PRINTER-QPRINT.

If the program in question produces multiple reports, is it as simple as
defining additional files like this?

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

If so, how does the O/S know to separate the reports as individual files?
Or
am I missing a qualification somewhere? Something special in the CL? The
above compiles fine but I'm not yet able to test the program.

A CL example calling a program that produces multiple report files would
be
very helpful. TIA

--
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



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.