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



Yes you can, but of course, it's only available in versions of RPG that are
relatively current (i.e. not V4R2). From the V5R2 manual:

EXTFILE(filename)
The EXTFILE keyword specifies which file, in which library, is opened. The
value
can be a literal or a variable. You can specify the value in any of the
following
forms:
filename
libname/filename
*LIBL/filename
Notes:
1. You cannot specify *CURLIB as the library name.
2. If you specify a file name without a library name, *LIBL is used.
3. The name must be in the correct case. For example, if you specify
EXTFILE(filename) and variable filename has the value 'qtemp/myfile', the
file
will not be found. Instead, it should have the value 'QTEMP/MYFILE'.
4. This keyword is not used to find an externally-described file at compile
time.
5. If a variable name is used, it must be set before the file is opened. For
files that
are opened automatically during the initialization part of the cycle, the
variable
must be set in one of the following ways:
File-Description Keywords
v Using the INZ keyword on the D specification
v Passing the value in as an entry parameter
v Using a program-global variable that is set by another module.
If you have specified an override for the file that RPG will open, that
override will
be in effect. In the following code, for the file named INPUT within the RPG
program, the file that is opened at runtime depends on the value of the
filename
field.
Finput if f 10 disk extfile(filename)
If the filename field has the value MYLIB/MYFILE at runtime, RPG will open
the
file MYLIB/MYFILE. If the command OVRDBF MYFILE OTHERLIB/OTHERFILE
has been used, the actual file opened will be OTHERLIB/OTHERFILE. Note that
any overrides for the name INPUT will be ignored, since INPUT is only the
name
used within the RPG source member.



On 10/30/06, James H H Lampert <jamesl@xxxxxxxxxxx> wrote:

Is there a way, short of shelling out an OVRDBF, of
qualifying a filename in ILE RPG?

I don't see anything in my usual docs (V4R2) about doing
that, but this would be compiling and running on a
customer V5R3 box. The situation involves triggers that
would propagate file changes into other files in libraries
not necessarily in the *LIBL.

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