|
Vishal, If you mean IFS files, then you can use the C functions open(), close(), fstat() and read(). They are in binding directory QC2LE. Here are some prototypes: Dopen pr 10i 0 extproc('open') D * value D 10i 0 value D 10u 0 value options(*nopass) D 10u 0 value options(*nopass) Dread pr 10i 0 extproc('read') D 10i 0 value D * value D 10u 0 value Dfstat pr 10i 0 extproc('fstat') D 10i 0 value D * value Dclose pr 10i 0 extproc('close') D 10i 0 value Look at the Unix-type APIs book for details. Buck Calabro > -----Original Message----- > From: Vishal Gupta > Sent: Monday, October 25, 1999 5:06 AM > To: RPG400-L@midrange.com > Subject: To read a text file directly > > Hi, > > I want to know that is there any way in ILE RPG to read a text file > directly. > > What i have done is that i have made a PF with one field and then copying > the full text file in that PF and using it in my program. > The number of lines in that text file becomes the number of records in the > > PF.This way it works fine. > > Is there any direct way to read and write to a text file instead of > converting it to PF. > > Can any one help me. > > Thanks, > Vishal. +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-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 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.