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


  • Subject: RE: AS/400 Database File to IFS CSV Format
  • From: jpcarr@xxxxxxxxxxxx
  • Date: Sat, 5 Aug 2000 19:53:23 -0400




Try writing an RPGIV program sometime to write DB2/400  files to the IFS in
CSV format.

You have much better control.  You can read one file chain to other files
and write an
amalgamated (mixture) of fields from numerous files to the IFS as one
record.  I also write the first record using literals (kinda like column
headings) for each column.  That way when you bring up the CSV file using
Excel, the first row has Real Column Headings so the user knows what each
column really is.

You can't do any of that with a generic CPY command.  Try using the API's
to write to the IFS one time and you'll be sold.  I have one
application(Green Screen) whenever a user updates the particular DB2 file,
and then presses F3 to exit the Maintenance program,   I re-write out the
CSV file.   So the spreadsheet(CSV File) is always insync with the AS/400's
data base.  The users love it.   Try running a program at night, to
summarize (Maybe) daily production or sales totals or something.  Write the
summarized info to the IFS.   The users come in in the morning and
yesterday's stats are already there.  No Downloading, No file Transfers,
Sweet.

BTW,  I'll be doing a session at COMMON on this process.

John Carr

---------------------------------------------
Bill,

     The *PCASCII is a keyword for the CPYTOSTMF command (STMFCODPAG
parameter).
Using CPYTOIMPF, I have had the best luck by pre-creating the stream file
once, then replacing records - or - you can specify a specific code page.

     Alex

I am on V4R3.  Either no PTF exists for the *PCASCII keyword or (shudder!)
IBM doesn't know about the PTF.  Can anyone give me the specific PTF number
to order for V4R3?  Or is this PTF only available on V4R4?



+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

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