|
> From: Vernon Hamberg
>
> He wants to pass some kind of reference to an opened file to another
> program - then work with it - this reference is available in C
What he wants is to be able to pass a file handle. We don't have file
handles in RPG (today) and that makes it tough.
> My recommendation is to write what he wants in an ILE C module and
> bind it into his app with procedure calls from ILE RPG.
Yup, this is the ticket. It's been forever since I tried to write an ILE C
file procedure, but it's not black magic for someone with C experience. You
could write a wrapper procedure for the open procedure and return the file
pointer, and then pass that back to your process and close procedures.
He doesn't get to use the RPG syntax, of course, which I think is the issue.
I think James wants to be able to write file-agnostic RPG syntax, an
admirable goal. As Paul points out, the closest you can get via RPG is if
the files have the same external format. Otherwise it's embedded SQL.
Joe
--
This is the RPG programming on the AS400 / 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.
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.