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



CPYSPLF can copy a spool file into a DB2 file.
Sample:
CRTPF FILE(ROB/SPOOL) RCDLEN(150)
No DDS needed. Make it at least 150 bytes to cover some overhead needed
by 132 character reports (like spool line number and stuff). You can
adjust down for 80 column reports or up for wider reports.

DSPJOB OUTPUT(*PRINT)
CPYSPLF FILE(QPDSPJOB) TOFILE(ROB/SPOOL) MBROPT(*REPLACE)
DSPPFM FILE(ROB/SPOOL)

DSPFFD FILE(ROB/SPOOL)

Field Level Information
Data Field Buffer Buffer Field Column
Field Type Length Length Position Usage Heading
SPOOL CHAR 150 150 1 Both
Coded Character Set Identifier . . . . . : 65535

However many people no longer generate simple reports. This file thing
will take off! People start outputting directly to Excel spreadsheets,
XML, HTTP, etc. Or output to a DB2 file (with actual columns and not one
field like SPOOL) and let their PC tool of choice generate the end report.

If you do use CPYSPLF, you may want to consider creating a view over it to
do the parsing out of the columns. Sort of like
create view SPOOLVIEW as (
select
CAST(substr(SPOOL, 2, 10) as char(10)) as Column1,
CAST(substr(SPOOL, 18, 10) as char(10)) as Column2,
...
from SPOOL
where /* and here is where you figure out how to eliminate headers */
)



Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.