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



An easy way to do this is using "USROPN" and a variable in extfile. To compile the system will use the name from 7-14, when you run the program you can set the variable to any file (with the same format) and all chain, read, eof, update, etc. will be using the file that you opened, not the one from the compile.
___________________________________________________________________________________________________
Yivi wrote:

Hi there.

Little newbie question.

I have a program that produces a statistic report, and that needs to read one file or another according to user's specification via a parameter.

But there are some lines of the program where I don't know how to manage to go along with the choice.

E.g.:
dow not %EOF(ALFDEALHP);
(The files are either ALFDEALHP or ALFDEALHC)

In the simpler 'CHAINs' and 'READEs' I can use unelegants but effective IFs, but doing it around the dow would end up with something ugly.

In some other language I'd be using a reference in the beggining of the program for the appropriate file; and then referring to that reference henceforth. But my newbieness in RPG is making itself, and I''ve been over the infocenter for a while without good results.

Hope someone can help.

Thx.

I.-



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.