Hafwhit
630 pts. | Jul 16 2009 5:10PM GMT
I agree with Cunninjoe on the basic steps. If you are a programmer I would suggest you write a program to read the file that the spool file is copied into. You then can separate the elements you need from the rest of the data and place it into an external file. I have done this in the past for some reports that get generated by programs we do not control. I read the file and only selected the records that did not have the header information and then split this detail into separate fields and output this to an external file. You then could create a .csv file from this new file.
If the program that generates the spool file is one written by your staff then I would suggest a change to the program to generate the output file at the same time as the report. I have done this in the past to generate a text file to be sent via email to an outside party and also print the report for the inside personnel.
YuVa47
280 pts. | Jul 19 2009 8:53AM GMT
If you are not a programmer (or a programmer but…) you can try a very good none expensive software called SpoolFactory. For more info you can contact me (yudavago at 013 dot net)
Yorkshireman
3200 pts. | Jul 20 2009 3:27PM GMT
If you do, indeed, want to take the ‘output’ of a report, which is a 132 or 198 byte record length file, then just use Client access to download the spoolfile.
CPYSPLF to a physical file, and use the CA wizard to move the file.
If you mean that you want user to receive the data represented in the report, then throw away the ‘report’ and use client access to download the data as a CSV.
If your report is unruly, and is carrying out calculations and what all, then you will need to make it write to an externally described data file, then continue as above
Whatever you’re wanting to do, a more detailed specification will be needed for us to provide much help
WM
340 pts. | Aug 15 2009 1:37AM GMT
I believe there is a way to export data or reports into MS Excel via iSeries Access/CA and if I’m not wrong you can actually schedule the entire process via the PC. That is if your planning to import reports into Excel.
Yorkshireman
3200 pts. | Aug 18 2009 8:44AM GMT
WM is correct,
For many mamny years, you could use CA to transfer data into a format for a spreadsheet. Initially the ‘BIFF3′ format was used, more recently, the ubiquitous CSV (comma separated variable) file format has become more widespread.
If you use CA, then create a download manually and keep the specs in a FDF.
When you are happy with it, then construct a batch file / script / JCL command to run it from wherever.
As regards the CSV, they are simple to construct - especially so in RPGLE where string handling is now simpler. Wrap a quote around alphameric fields and put comma’s between fields. beware of embedded quotes in alpha fields.






