|
The mode option on the open() or fopen() interface accept a "w" value. This will create the file if it does not exist, if it already exists, the "w" option will erase the contents of the pre-existing file (similar to a CLRPFM). -Cozzi > -----Original Message----- > From: rpg400-l-admin@midrange.com > [mailto:rpg400-l-admin@midrange.com] On Behalf Of Phil > Sent: Monday, May 13, 2002 5:45 PM > To: rpg400-l@midrange.com > Subject: RE: RPG & the IFS & CSV > > > This is easy to do, once you've done it once. > > You need to use the unix-like api's which include open(), > close(), read(), write(), etc. > > There should be plenty of examples in the archives. > > Phil > > > > > -----Original Message----- > > From: rpg400-l-admin@midrange.com > > [mailto:rpg400-l-admin@midrange.com]On > > Behalf Of Hatzenbeler, Tim > > Sent: Monday, May 13, 2002 5:44 PM > > To: 'rpg400-l@midrange.com' > > Subject: RPG & the IFS & CSV > > > > > > This message is in MIME format. Since your mail reader does not > > understand this format, some or all of this message may not be > > legible. > > -- > > [ Picked text/plain from multipart/alternative ] > > I know I have seen bits and pieces posted by Scott, but when I > > went back to > > the archives I had trouble finding the post and or posts, > that would allow > > me to put it together... But I was hoping maybe someone > could help... > > > > I would like to have my RPG, check for the existance of an > IFS file, > > and if it's not there, create a PC compatable stream file, > so I could > > populate it with comma seperated fields (csv), so excel can read it. > > > > I know cpytoimpf will also work, but I wanted more control over the > > data, thats being written in to the stream file.. > > > > Any help would be appreciated... And I'll go back into the > archives to > > see if I can find the relative pieces of code... > > > > Thanks, tim > > This e-mail message, including any attachments, is for the > sole use of > > the intended recipient(s) and may contain confidential or > privileged > > information. Any unauthorized review; use, disclosure or > distribution > > is prohibited. If you are not the intended recipient, > please contact > > the sender by reply e-mail and destroy the message. > > _______________________________________________ > > This is the RPG programming on the AS400 / iSeries > (RPG400-L) mailing > > list To post a message email: RPG400-L@midrange.com To subscribe, > > unsubscribe, or change list options, > > visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l > > or email: RPG400-L-request@midrange.com > > Before posting, please take a moment to review the archives at > > http://archive.midrange.com/rpg400-l. > > > > > > > _______________________________________________ > This is the RPG programming on the AS400 / iSeries (RPG400-L) > mailing list To post a message email: RPG400-L@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l > or email: RPG400-L-request@midrange.com > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. > >
As an Amazon Associate we earn from qualifying purchases.
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.