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



Chris Wolcott wrote:
> 
> I can not get a result searching the RPG manuals, so here goes:
> 
> In ILE COBOL I can open a file in a main entry module, and then access
> it from other modules (without additional OPEN/CLOSE statements).  All I
> have to do is specify EXTERNAL (Maybe GLOBAL?) on the FD line.  I'd like
> to do the same in ILE RPG, but can not find any references to how to do
> it.  For now I'm opening the file twice, once in the main entry point
> program and again in the second module that is bound to it.

RPG doesn't have support for global files like COBOL does.  You are
doing it the right way.  You can override the file to be shared, if you
want the two modules to share the same file-open.

> 
> The program maintains a related set of files.  Right now both the main
> module and secondary module need to access the secondary file.  What I'd
> like to do is open the primary file in the primary module, and the
> secondary file in the secondary module and code sub-procedures that I
> can EXPORT to handle the data.  When I tried coding a sub-procedure in
> the secondary module that was called by the primary, I got a file access
> error.

What do you mean by "file access error"?


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.