|
We were in the same situation several years ago (over 20).
We switch to a model where we use the library list and all files/data area
have the same name regardless of the company. Works like a charm. We had to
do this when the number of company got so high that we could not create
distinct names (A.xxx, B.xxx all the way to Z.xxx. We even used some
special caracters).
I would strongly recommend switching to this method. It has several
advantages:
- All object for a company are grouped together
- Easier if you want to do things like backup at different time depending
on the company
- When a new company is created, no change in the code is required, just
create a new library populated with the files that have the same name for
all companies
Denis Robitaille
Chef de service TI – Solution d’entreprise
Infrastructure et opérations
CASCADES CENTRE DES TECHNOLOGIES
412 Marie Victorin
Kingsey falls(Québec) Canada J0A 1B0
Tél : 819 363 6100 Poste :52130
Cell : 819 352 9362
-----Message d'origine-----
De : RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> De la part de Jerry
Adams
Envoyé : 8 février 2019 10:21
À : 'RPG programming on the IBM i (AS/400 and iSeries)' <
rpg400-l@xxxxxxxxxxxxxxxxxx>
Objet : RE: External Data Areas - Multiple Companies, One Program
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=DwIGaQ&c=pApUd0AUA6FmKRo01iR_VA&r=r7w16KGEqE6t2tVCvCsz4_ztz5b0wbCtdhwrG0PzYq8&m=MrYBNVnCvIQvfBYBUJjdskFWfCHWlicj_Xss_Tyl13M&s=5vxfMg1fj0FZo9vVbolNc6riawovdh5ml0Agde7aAU4&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 aready.
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
easy.
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
read.
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
But looking ahead, I wanted to make it flexible so that the next timeeffect.
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
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.midrange.com_mailman_listinfo_rpg400-2Dl&d=DwIGaQ&c=pApUd0AUA6FmKRo01iR_VA&r=r7w16KGEqE6t2tVCvCsz4_ztz5b0wbCtdhwrG0PzYq8&m=MrYBNVnCvIQvfBYBUJjdskFWfCHWlicj_Xss_Tyl13M&s=BSbMAs8dQQnybnndFdVu9Bnevx2x0JT5kdFEZTklJjo&e=
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:
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxxhttps://urldefense.proofpoint.com/v2/url?u=https-3A__archive.midrange.com_rpg400-2Dl&d=DwIGaQ&c=pApUd0AUA6FmKRo01iR_VA&r=r7w16KGEqE6t2tVCvCsz4_ztz5b0wbCtdhwrG0PzYq8&m=MrYBNVnCvIQvfBYBUJjdskFWfCHWlicj_Xss_Tyl13M&s=hKKq6sEYu53uOaSASp1yJG5uS9QFUsROSDKcoGZ9E44&e=
Before posting, please take a moment to review the archives at
.
https://urldefense.proofpoint.com/v2/url?u=https-3A__amazon.midrange.com&d=DwIGaQ&c=pApUd0AUA6FmKRo01iR_VA&r=r7w16KGEqE6t2tVCvCsz4_ztz5b0wbCtdhwrG0PzYq8&m=MrYBNVnCvIQvfBYBUJjdskFWfCHWlicj_Xss_Tyl13M&s=6K-dSCoDgTB2zBBGx6jZyx7j8zmGY_ncUbN-rKtIRZ0&e=
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link:
--
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=DwIGaQ&c=pApUd0AUA6FmKRo01iR_VA&r=r7w16KGEqE6t2tVCvCsz4_ztz5b0wbCtdhwrG0PzYq8&m=MrYBNVnCvIQvfBYBUJjdskFWfCHWlicj_Xss_Tyl13M&s=BSbMAs8dQQnybnndFdVu9Bnevx2x0JT5kdFEZTklJjo&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=DwIGaQ&c=pApUd0AUA6FmKRo01iR_VA&r=r7w16KGEqE6t2tVCvCsz4_ztz5b0wbCtdhwrG0PzYq8&m=MrYBNVnCvIQvfBYBUJjdskFWfCHWlicj_Xss_Tyl13M&s=hKKq6sEYu53uOaSASp1yJG5uS9QFUsROSDKcoGZ9E44&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=DwIGaQ&c=pApUd0AUA6FmKRo01iR_VA&r=r7w16KGEqE6t2tVCvCsz4_ztz5b0wbCtdhwrG0PzYq8&m=MrYBNVnCvIQvfBYBUJjdskFWfCHWlicj_Xss_Tyl13M&s=6K-dSCoDgTB2zBBGx6jZyx7j8zmGY_ncUbN-rKtIRZ0&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=DwIGaQ&c=pApUd0AUA6FmKRo01iR_VA&r=r7w16KGEqE6t2tVCvCsz4_ztz5b0wbCtdhwrG0PzYq8&m=MrYBNVnCvIQvfBYBUJjdskFWfCHWlicj_Xss_Tyl13M&s=BSbMAs8dQQnybnndFdVu9Bnevx2x0JT5kdFEZTklJjo&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=DwIGaQ&c=pApUd0AUA6FmKRo01iR_VA&r=r7w16KGEqE6t2tVCvCsz4_ztz5b0wbCtdhwrG0PzYq8&m=MrYBNVnCvIQvfBYBUJjdskFWfCHWlicj_Xss_Tyl13M&s=hKKq6sEYu53uOaSASp1yJG5uS9QFUsROSDKcoGZ9E44&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=DwIGaQ&c=pApUd0AUA6FmKRo01iR_VA&r=r7w16KGEqE6t2tVCvCsz4_ztz5b0wbCtdhwrG0PzYq8&m=MrYBNVnCvIQvfBYBUJjdskFWfCHWlicj_Xss_Tyl13M&s=6K-dSCoDgTB2zBBGx6jZyx7j8zmGY_ncUbN-rKtIRZ0&e=
Cascades - ATTENTION: Ce courriel provient de l'extérieur de
l'organisation. Ne pas cliquer sur les liens et ne pas ouvrir les pièces
jointes sauf si vous reconnaissez l'expéditeur et que vous êtes sûr que le
contenu est légitime.
Cascades - CAUTION: This email is from outside the organization. Do not
click on links or open attachments unless you recognize the sender and you
are sure the content is safe.
--
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=DwIGaQ&c=pApUd0AUA6FmKRo01iR_VA&r=r7w16KGEqE6t2tVCvCsz4_ztz5b0wbCtdhwrG0PzYq8&m=MrYBNVnCvIQvfBYBUJjdskFWfCHWlicj_Xss_Tyl13M&s=BSbMAs8dQQnybnndFdVu9Bnevx2x0JT5kdFEZTklJjo&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=DwIGaQ&c=pApUd0AUA6FmKRo01iR_VA&r=r7w16KGEqE6t2tVCvCsz4_ztz5b0wbCtdhwrG0PzYq8&m=MrYBNVnCvIQvfBYBUJjdskFWfCHWlicj_Xss_Tyl13M&s=hKKq6sEYu53uOaSASp1yJG5uS9QFUsROSDKcoGZ9E44&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=DwIGaQ&c=pApUd0AUA6FmKRo01iR_VA&r=r7w16KGEqE6t2tVCvCsz4_ztz5b0wbCtdhwrG0PzYq8&m=MrYBNVnCvIQvfBYBUJjdskFWfCHWlicj_Xss_Tyl13M&s=6K-dSCoDgTB2zBBGx6jZyx7j8zmGY_ncUbN-rKtIRZ0&e=
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.