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



From: Jon Paris

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.

One other option - given that he is C literate is to write a simple C
program that interfaces to RPG as a SPECIAL file. This would allow
one generic program to be used with native RPG I/O operations.

I always forget SPECIAL files!

Lemme see... so on the OPEN you would pass in enough information to allow
the invoked C function to do its _ROPEN under the covers, and then in the
RPG program you could so your standard RPG syntax to the fields of the file,
but your CHAINs and so on would cause the C function to execute the
appropriate C APIs.

Yeah, that would work perfectly to segregate the RPG from the C code. The
only issue might be how to get the same program to simultaneously process
multiple files. James didn't specifically mention that as a requirement,
but using the standard C APIs, you can easily open multiple files and pass
each one to one or more processing routines and then finally close each one.
I don't know that such parallelism is a need, though, and if not then this
is a moot point.

Joe


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.