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



A very good reason will be to replace the green screen with a web interface.
Process will be greatly simplified as an extra benefit.

On Tue, Jul 18, 2023 at 10:39 AM K Crawford <kscx3ksc@xxxxxxxxx> wrote:

Jerry, we have a lot of similarities. Our tables use sort of a double
prefix. A.=Accounting C.=Cafiteria etc. the second part is the company
.AS, .PK etc. the last is the two digit file name. So they look like
C.AS.EM or C.PK.EM etc.

I am trying my hardest to get us out of 36E. But the owner of the
company/programmer says only if it makes sense to convert it. If it aint
broke don't fix it.

I have used the EXTDESC() before but this project looked like a good fit
for the EXTFILE(). We wanted to create some tables in another library that
would get populated in special situations. Someone said let's use the same
table names. I wanted to just put a char at the end so we knew they are
not the same. We use the USROPN a lot also. This set of programs are
SQLRPGLE in the call stack leading up to these programs are some RPG36
programs that use the // FILE. That is what got me in trouble. If they
get mad about me using a new table name I will try the USROPN. Otherwise
it is working now.

KCrawford

On Tue, Jul 18, 2023 at 6:47 AM Jerry Adams <midrange@xxxxxxxx> wrote:

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.



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



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.