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



Have you thought about utilizing a user space or a keyed user index in
place of the data area?

Gary Monnier



On Fri, Feb 8, 2019 at 7:21 AM Jerry Adams <midrange@xxxxxxxx> wrote:

Brad,

That's basically how I determine which file to open. I keep a data area in
QTEMP for the user as s/he logs in that specifies which company s/he is
using.

To be more specific, the original system was designed on a S/36 and uses
group file ids, such that company A uses 'A.file' and Company B uses
'B.file' so I just take the group id and build the file name.

Jerry C. Adams
When is this "Old enough to know better" supposed to kick in?
IBM i Programmer/Analyst
--
NMM&D
615-832-2730

-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of B
Stone
Sent: Friday, February 08, 2019 8:30 AM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: Re: External Data Areas - Multiple Companies, One Program

Could you use the LDA to set what company is open, and then open the
specific data area depending on that?

I seem to recall doing something similar at an old job... it was my
introduction to the LDA. :)

Bradley V. Stone
www.bvstools.com
MAILTOOL Benefit #6 <
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.bvstools.com_mailtool.html&d=DwICAg&c=pApUd0AUA6FmKRo01iR_VA&r=r7w16KGEqE6t2tVCvCsz4_ztz5b0wbCtdhwrG0PzYq8&m=lXMyULziXZlGbg5agd_Pqbt8DWPvitCStiA2PytG5C4&s=WrHfMd-jfljYkpPLU1D0xb4us6Ti4CUX1M05ukYUvAs&e=>:
Easily send
group emails with Distribution Lists

On Fri, Feb 8, 2019 at 8:18 AM Jerry Adams <midrange@xxxxxxxx> wrote:

The discussion the other day on data structures brought to mind a
problem that I have been working on regarding data areas. I used a
data area to function as a sort of "truth table" for our company. O
read it into a program to determine if the next (or following) step is
ready.



Works fine, but the owner decided that he wants to add a new company.
There
will be, I am sure, some new programs for it, but the basic back
office processing is pretty much the same. So I am modifying the
programs to access the file depending upon the company. That's
relatively
easy.



The issue with the data area on disk is that I have not been able to
find a way in the manuals (that I understood, anyway) to access
different data areas. For example, a disk file can have a
EXTFILE(some-name) with USROPN that I then use to define that
"some-name" before I open the file. I cannot find anything similar
for data areas on disk.



I could, I know, just define two data areas in the program(s) and then
use the same method I'm using for files to determine which data area to
read.
But looking ahead, I wanted to make it flexible so that the next time
he sets up a new company, I will not have to go back into the program.
I could, for example, easily change it to a data file. But wondered
if there were any minimal coding changes that would accomplish the same
effect.



Any ideas/thoughts welcomed.



Thanks.



Jerry C. Adams

Do what is right because it is right, and leave it alone. -Chiune
Sugihara

IBM i Programmer/Analyst

--

NMM&D

615-832-2730



--
This is the RPG programming on the IBM i (AS/400 and iSeries)
(RPG400-L) mailing list To post a message email:
RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list
options,
visit:
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.midrange.com_mailman_listinfo_rpg400-2Dl&d=DwICAg&c=pApUd0AUA6FmKRo01iR_VA&r=r7w16KGEqE6t2tVCvCsz4_ztz5b0wbCtdhwrG0PzYq8&m=lXMyULziXZlGbg5agd_Pqbt8DWPvitCStiA2PytG5C4&s=1L7Wo-S8AMYYoioejjNYvQd3la2V1JhXdzs3WkIti2E&e=
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at

https://urldefense.proofpoint.com/v2/url?u=https-3A__archive.midrange.com_rpg400-2Dl&d=DwICAg&c=pApUd0AUA6FmKRo01iR_VA&r=r7w16KGEqE6t2tVCvCsz4_ztz5b0wbCtdhwrG0PzYq8&m=lXMyULziXZlGbg5agd_Pqbt8DWPvitCStiA2PytG5C4&s=RDsSniwhLDlaFRtWK6l3D3jdgcRWQFOmvEyjQLCwfcI&e=
.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link:
https://urldefense.proofpoint.com/v2/url?u=https-3A__amazon.midrange.com&d=DwICAg&c=pApUd0AUA6FmKRo01iR_VA&r=r7w16KGEqE6t2tVCvCsz4_ztz5b0wbCtdhwrG0PzYq8&m=lXMyULziXZlGbg5agd_Pqbt8DWPvitCStiA2PytG5C4&s=DJH6PJFTl6ixJVanIduoJbBS1OJqTFSHOI2Q5z8FtX4&e=

--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit:
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.midrange.com_mailman_listinfo_rpg400-2Dl&d=DwICAg&c=pApUd0AUA6FmKRo01iR_VA&r=r7w16KGEqE6t2tVCvCsz4_ztz5b0wbCtdhwrG0PzYq8&m=lXMyULziXZlGbg5agd_Pqbt8DWPvitCStiA2PytG5C4&s=1L7Wo-S8AMYYoioejjNYvQd3la2V1JhXdzs3WkIti2E&e=
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at

https://urldefense.proofpoint.com/v2/url?u=https-3A__archive.midrange.com_rpg400-2Dl&d=DwICAg&c=pApUd0AUA6FmKRo01iR_VA&r=r7w16KGEqE6t2tVCvCsz4_ztz5b0wbCtdhwrG0PzYq8&m=lXMyULziXZlGbg5agd_Pqbt8DWPvitCStiA2PytG5C4&s=RDsSniwhLDlaFRtWK6l3D3jdgcRWQFOmvEyjQLCwfcI&e=
.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link:

https://urldefense.proofpoint.com/v2/url?u=https-3A__amazon.midrange.com&d=DwICAg&c=pApUd0AUA6FmKRo01iR_VA&r=r7w16KGEqE6t2tVCvCsz4_ztz5b0wbCtdhwrG0PzYq8&m=lXMyULziXZlGbg5agd_Pqbt8DWPvitCStiA2PytG5C4&s=DJH6PJFTl6ixJVanIduoJbBS1OJqTFSHOI2Q5z8FtX4&e=

--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.midrange.com_mailman_listinfo_rpg400-2Dl&d=DwICAg&c=pApUd0AUA6FmKRo01iR_VA&r=r7w16KGEqE6t2tVCvCsz4_ztz5b0wbCtdhwrG0PzYq8&m=lXMyULziXZlGbg5agd_Pqbt8DWPvitCStiA2PytG5C4&s=1L7Wo-S8AMYYoioejjNYvQd3la2V1JhXdzs3WkIti2E&e=
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
https://urldefense.proofpoint.com/v2/url?u=https-3A__archive.midrange.com_rpg400-2Dl&d=DwICAg&c=pApUd0AUA6FmKRo01iR_VA&r=r7w16KGEqE6t2tVCvCsz4_ztz5b0wbCtdhwrG0PzYq8&m=lXMyULziXZlGbg5agd_Pqbt8DWPvitCStiA2PytG5C4&s=RDsSniwhLDlaFRtWK6l3D3jdgcRWQFOmvEyjQLCwfcI&e=
.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link:
https://urldefense.proofpoint.com/v2/url?u=https-3A__amazon.midrange.com&d=DwICAg&c=pApUd0AUA6FmKRo01iR_VA&r=r7w16KGEqE6t2tVCvCsz4_ztz5b0wbCtdhwrG0PzYq8&m=lXMyULziXZlGbg5agd_Pqbt8DWPvitCStiA2PytG5C4&s=DJH6PJFTl6ixJVanIduoJbBS1OJqTFSHOI2Q5z8FtX4&e=


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.