Try:
DCL-DS Table
*N '10006477244';
*N '18612726414';
*N '20612726414';
*N '25612726414';
*N '30187812631';
*N '40006198980';
*N '51006477244';
*N '54043835454';
*N '59043835454';
*N '60006477244';
*N '64926463431';
*N '75588109301';
*N '80006477244';
*N '85926463431';
*N '88545318045';
Arr Dim(15) Pos(1);
TABWHS Char(2) Overlay(Arr);
TABDUN Char(9) Overlay(Arr: *Next);
End-DS
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
?Train people well enough so they can leave, treat them well enough so they
don't want to.? (Richard Branson)
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of
JRusling@xxxxxxxxxxx
Sent: Freitag, 1. Dezember 2017 15:55
To: 'RPG programming on the IBM i <rpg400-l@xxxxxxxxxxxx>
Subject: Free form example to setup a lookup table in an rpg program.
I would like a free form example to setup a lookup table in an rpg program
It would have 2 columns... Warehouse (2a) and Dunns code (9a) Warehouse
would be used to lookup the Dunns code Warehouse entries would be unique,
Dunns codes may duplicate.
(I know i could make a table to do this but trying to exercise my brain
:-)
I would like to initialize the entries in the d-specs.
Any example I can adapt to this is appreciated.
I am looking to replace the old code below.
Thanks for any help or direction.
John
<old code>
d-specs:
d TABWHS s 2 dim(15) ctdata perrcd(1)
d TABDUN s 9 dim(15) alt(TABWHS)
c-specs:
c s2whs lookup TABWHS TABDUN 61 (EQ)
data:
** Warehouse/DUNS # tables
10006477244
18612726414
20612726414
25612726414
30187812631
40006198980
51006477244
54043835454
59043835454
60006477244
64926463431
75588109301
80006477244
85926463431
88545318045
</old code>
<br />
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorized. If you are not the intended recipient, any disclosure,
copying, distribution or any action taken or omitted to be taken in reliance
on it, is prohibited and may be unlawful.
--
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:
https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
http://amzn.to/2dEadiD
As an Amazon Associate we earn from qualifying purchases.