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



Oh - sorry Jeff.

This is from Scott's buffo_h.rpgle file so I guess he added it after he had done the ebook.

*-----------------------------------------------------------------
* fwrite(): Write items
*
* data = (input) data items to write
* size = (input) size of each data item
* count = (input) number of data items
* stream = (input) pointer to FILE structure to write to
*
* returns the number of full items written. A short count
* indicates an error.
*-----------------------------------------------------------------
D fwrite PR 10U 0 ExtProc('_C_IFS_fwrite')
D data * value
D size 10U 0 value
D count 10U 0 value
D stream like(pFILE) value

I've never had need to use it but it looks straightforward. Hopefully you can figure it out.

There are also examples of this set of APIs in this thread http://forums.iprodeveloper.com/forums/aft/49525/afpg/2 which I located by googling for "fwrite scott klement site:iprodeveloper.com" (sans quotes)


On 2014-09-05, at 9:17 AM, Jeff Young <jyoung0950@xxxxxxxxx> wrote:

Bryan and Jon,
Thank you for the informed responses.
Unfortunately, neither of them address the *fwrite *operation.
I am familiar with the *write* operation, but had wanted to use the *fwrite*
in my application.
I have since reverted back to the *write* function, but would still like to
know how to use the *fwrite*.
I have looked at the documented prototypes, but not being a *C* or *Java*
programmer, can not totally understand them.



Jeff Young
Sr. Programmer Analyst


On Thu, Sep 4, 2014 at 3:15 PM, Bryan Dietz <bdietz400@xxxxxxxxx> wrote:

try searching for "_C_IFS_fwrite"

I found a post on another forum:
http://forums.iprodeveloper.com/forums/aft/48850

hope it helps...

Bryan


Jeff Young wrote on 9/4/2014 2:20 PM:

Does anyone have an example on how to use this function?

Thanks,

Jeff Young
Sr. Programmer Analyst

--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.