Try this..

d file s * inz

d @ifsOpen pr * extproc('_C_IFS_fopen')
d fileName * value options(*string)
d fileMode * value options(*string)
d @ifsPut pr * extproc('_C_IFS_fputs')
d string * value options(*string)
d file * value options(*string)
d @ifsClose pr * extproc('_C_IFS_fclose')
d file * value options(*string)

/free
file = @ifsOpen('/home/dancik/logs/DB9995MA.TXT': 'a');
@ifsPut('This is only a Test' + x'0D25': file);
@ifsPut('This is only a Test' + x'0D25': file);
@ifsPut('This is only a Test' + x'0D25': file);
@ifsClose(file);

*inlr = *on;
/end-free

David L. Mosley, Jr.
Technical Solutions Architect
Dancik International, Ltd.
2000 CentreGreen Way, Suite 250
Cary, NC 27513

www.dancik.com



"tim.dclinc" <tim.dclinc@xxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
03/03/2011 10:21 AM
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>


To
<rpg400-l@xxxxxxxxxxxx>
cc

Subject
append to txt file in ifs sample






Does anyone have a sample of how to append to a txt file located in the
ifs...



im using Scott Klements "working with the ifs in RPG iv", but dont see any
examples using append.



Thanks.


This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 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.