|
Like you, I live in the 36E. I have a test environment, which is a mirror
image of production. Plus we have multiple companies that, for some reason,
are defined by a prefix (A., D. etc.).
I usually have to use the EXTFILE(SomeFile) directive where SomeFile is
built. After that, the library list is usually sufficient to find the
file.
But I have never tried to use the EXTFILE() directive without the USROPN;
didn't even know that was acceptable. Since you have that part already
coded, why not change the program for explicit open at the beginning? With
the library coded in EXTFILE() this would have the same effect of an OVRDBF
command or an OCL // FILE NAME- statement.
Now, after saying that, I am wondering why the implicit open (i.e., without
the USROPN directive) does not point to the library/file as you defined it.
Based upon your experience it obviously does not. A reportable bug? I
admit that I did not reference the ILE RPG manual to see what, if anything,
it says about your situation/definition.
Jerry C. Adams
Without a catcher the ball is just going to roll to the backstop. -Casey
Stengel
IBM i Programmer/Analyst
--
NMM&D
615-585-2175
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of K
Crawford
Sent: Monday, July 17, 2023 12:12 PM
To: RPG400-L@xxxxxxxxxxxxxxxxxx
Subject: Program using table from wrong library
I have a table in two libraries with the same name.
PRODTBLS/OPENENRL
TBLSLIB/OPENENRL
The one in TBLSLIB has two extra columns.
I have the program like this.
// OutPutTable
dcl-f OutPutT disk usage(*output)
extfile('TBLSLIB/OPENENRL')
extdesc('TBLSLIB/OPENENRL')
rename(OpenRLR:OutputR);
// OutDS
dcl-ds OutDS extname('TBLSLIB/OPENENRL') end-ds;
The program compiles fine, I have TBLSLIB in my library list before
PRODTBLS for the compile.
When the program runs I get a level check on the table OPENENRL. When
looking at the job it is using the table from PRODTBLS not TBLSLIB. The
error would be correct, because it used the wrong table. The library list
for this job has PRODTBLS but TBLSLIB is not in the list. I have other
programs like this and they are using the TBLSLIB.
This table would have been opened in the calling program, but for the
PRODTBLS.
Why is the program using the wrong library/table?
--
KCrawford
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
As an Amazon Associate we earn from qualifying purchases.
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.