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



I just found this in the docs. (I looked earlier, but did not find this
page)

http://www-01.ibm.com/support/knowledgecenter/ssw_ibm_i_72/rzasd/fextfil.htm


"*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
**INPUTwithin
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.*"


Thanks for pointing me in the right direction.
-doug

On Wed, Jun 3, 2015 at 7:38 AM, Buck Calabro <kc2hiz@xxxxxxxxx> wrote:

Overrides supersede, or, well, override the specified settings. The
RPG source code specified PRDLIB but the override says 'Hey, ignore
whatever the other guy tells you. I'm telling you to use *LIBL' So
when the compiler goes looking for MYFILE, the override forces its
hand, it looks in *LIBL and MYFILE isn't there.
--buck

On 3 June 2015 at 07:32, Doug Davie <dougdavie@xxxxxxxxx> wrote:
Thanks Buck.
There is an override, and that's what causes the RNF2120 in the compile.

So now the question is why?


I've broken it down to this simple test case.
I put this in a CLLE:
ADDLIBLE PRDLIB
OVRDBF FILE(MYFILE) TOFILE(*LIBL/MYFILE)
RMVLIBLE PRDLIB
CRTBNDRPG PGM(DEVLIB/MYPGM) SRCFILE(DEVLIB/QRPGLESRC) SRCMBR(MYPGM)

where:
DEVLIB/QRPGLESRC(MYPGM) uses
DCL-F MYFILE DISK(*EXT) USAGE(*INPUT) KEYED
EXTDESC('PRDLIB/MYFILE') EXTFILE(*EXTDESC);

When I call the CLLE, I receive the RNF2120 in the compile.


So, I can understand that if I have an override to MYFILE in *LIBL, and
try
to use MYFILE when it is not in the *LIBL I would get a file not found
condition.
BUT!
Shouldn't EXTDESC('PRDLIB/MYFILE') trump the override?

I would expect EXTDESC('*LIBL/MYFILE') or EXTDESC('MYFILE') to cause the
RNF2120.
But here I specifically indicate PRDLIB, and would expect the file to be
found regardless of any overrides.


-doug



On Tue, Jun 2, 2015 at 5:44 PM, Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx

wrote:

Hi Doug

Maybe look at the generated source to see what the pre-compiler did with
it. Should be one in QTEMP, but you can specify a peristent library on
the
CRTSQLRPGI command.

HTH
Vern


On 6/2/2015 2:45 PM, Doug Davie wrote:

I'll assume yes, that there is an OVRDBF. But it's hard to track down
as
the actual compile is fairly deep in the call stack. (I'll get it in
debug
to give a definitive answer)
I've tried tests of creating an OVRDBF, but that works fine in testing.
I've also tried tests of locking MYFILE exclusively in another session,
but
that also works fine.


My testing has been on both v7.2 and v7.1


On Tue, Jun 2, 2015 at 3:35 PM, Buck Calabro <kc2hiz@xxxxxxxxx> wrote:

On 6/2/2015 1:30 PM, Doug Davie wrote:

My RPGLE program uses this:
DCL-F MYFILE DISK(*EXT) USAGE(*INPUT) KEYED
EXTDESC('PRDLIB/MYFILE') EXTFILE(*EXTDESC);

(yes, PRDLIB/MYFILE does indeed exist)

I submit my compile to batch and the program is created.
PRDLIB is not in my library list forthe compile.
DSPPGMREF does indeed show PRDLIB/MYFILE getting used.

Now I have another more involved process that runs in batch, and as
part

of

that batch process the CRTBNDRPG command is issued with the exact
same
parms I used previously, using the exact same member. In this batch

process

the PRDLIB/MYFILE *FILE is actually being used and is open.
This subsequent compile produces:
RNF2120 - External descriptions for file 'PRDLIB... not found; file
is
ignored.

I've also tried this format:
FMYFILE IF E K DISK EXTDESC('PRDLIB/MYFILE')
with the same results.

This actually started off as an SQLRPGLE, which produced:
SQL1001 30 17 External file definition for MYFILE not found.


Why can't the compiler find PRDLIB/MYFILE ?

Is there an OVRDBF for MYFILE in the batch process that does the
failing
CRTBNDRPG?

--
--buck

--
This is the RPG programming on the IBM i (AS/400 and 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.



--
This is the RPG programming on the IBM i (AS/400 and 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.


--
This is the RPG programming on the IBM i (AS/400 and 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.

--
This is the RPG programming on the IBM i (AS/400 and 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 ...

Follow-Ups:
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.