|
I have not gotten it to work yet, but I think I may have found the answer: http://www-1.ibm.com/servers/enable/site/porting/iseries/overview/faq_files.html In ILE, when I tried fopen(), fclose(), etc. on IFS stream files in QOpenSys they do not seem to work, but the low level calls do not have any problems. Is there any difference in these two types of calls? Yes. The two types of calls are different in the ILE environment. The calls like fopen(), fclose(), fread() work on the database files whereas low-level calls like open(), close(), read() work on the stream files. The low level calls can work on the database files by specifying the full qualified name (i.e. /qsys.lib/< library>.lib/< file>.file/< mbr>.mbr). Calls like fopen(), fclose, and fread() can also work on the stream files in QOpenSys if *IFSIO is specified for "System Interface Option" on CRTCMOD command. Once the program is created with *IFSIO option absolute or relative path names can be specified with fopen(), fclose() etc calls. However, after specifying *IFSIO these call will not work on the native database file system even if fully qualified path name is specified. On Fri, 18 Mar 2005 14:11:22 -0600, Elvis Budimlic <ebudimlic@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote: > Perhaps if you compile your module with SYSIFCOPT(*IFSIO)? > > Elvis > > -----Original Message----- > Subject: Re: [C400-L] DB2 UDF written in C > > Working: > select debugout( 'pgmrfillib/what', 'Hello' ) from sysibm/sysdummy1 > > Not working: > select debugout( '/tmp/out.txt', 'Hello' ) from sysibm/sysdummy1 > > How can I get fopen to work with the IFS ? > > -Steve More > > _______________________________________________ > This is the C programming iSeries / AS400 (C400-L) mailing list > To post a message email: C400-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/c400-l > or email: C400-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/c400-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.