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



On 9/5/2014 9:17 AM, Jeff Young wrote:
Bryan and Jon,
Thank you for the informed responses.
Unfortunately, neither of them address the *fwrite *operation.

Scott's answer (26 Jul 2007 09:45 PM) prototypes fwrite like so:

D Write_ PR 10U 0 ExtProc('_C_IFS_fwrite')
D data 16383C const options(*varsize)
D size 10U 0 value
D count 10U 0 value
D stream * value

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

I myself am only barely useful when it comes to C and Java. Often, when
I find myself 'wanting to use' a particular function (like fwrite) it's
because I'm looking at an example from elsewhere that I'd like to adapt
for the midrange. If that's what's happening here, perhaps you could
describe what it is that is steering you toward fwrite() - why does the
example you're looking at use fwrite over write()? What are you trying
to do that you chose this example?

One thing I find helpful when looking at a C example is to compile it
myself on my PC. GNU C is easy to come by: you can install a pretty
nice *ix subset with Cygwin. When I'm convinced that the example will
actually work (not everything on the internet does!) then I move the
source to IBM i and compile it there. More than half the time, all I
need to do is jigger it a bit so that I can call the function from RPG,
so I leave it in C and put it in a service program.

--buck

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

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.