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



I had that one.

In C, you can do the following:


FILE *fdsrc;
fdsrc=fopen('/tmp/filename.ext','rb');
if fdsrc<>NULL;
fclose(fdsrc);
endif;

The problem is comparing the fdsrc to see if it is a valid handler or not.


----- Original Message -----

From: "Jan Grove Vejlstrup" <jgv@xxxxxxxx>
To: "rpg400-l" <rpg400-l@xxxxxxxxxxxx>
Sent: Thursday, January 14, 2016 10:45:55 AM
Subject: Re: RPG prototype for C-language FILE *

You can find some of the prototypes from Scott Klement here:

http://www.agnethe.dk/mcpressonline/likesoundex/source/bufio_h.txt

Best regards

Jan



Am 14.01.2016 um 16:24 schrieb tegger@xxxxxxxxxxx:
I have that document.
The trouble is not being able to open a file in a binary mode using the open() function. I know that I can open a file in binary mode with the fopen. The CL commands to copy files around the IFS is way too slow. When the routines copy a PDF file, they garbage the output file. Most text files are fine, but some get gummed up too.



----- Original Message -----

From: "Luis Rodriguez" <luisro58@xxxxxxxxx>
To: "RPG programming on the IBM i (AS/400 and iSeries)" <rpg400-l@xxxxxxxxxxxx>
Sent: Thursday, January 14, 2016 9:33:14 AM
Subject: Re: RPG prototype for C-language FILE *

Jay,

Scott Klement has posted in his web site some very easy to use examples
about accessing the IFS with RPGLE. Check the following URL:

http://scottklement.com/rpg/ifs.html

In fact, check the whole site :-) Scott has some wonderful routines and
code examples....

HTH,

Luis

Luis Rodriguez



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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 copyright@midrange.com.

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.