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



"RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx> wrote on 12/01/2017 11:44:50
AM:
I would use something more like this.

dcl-ds WhsLookup_t template;
Whs char(2);
*n char(1);
Duns char(9);
end-ds;

dcl-ds *n;
*n char(12) inz('10 006477244');
*n char(12) inz('18 612726414');
*n char(12) inz('20 612726414');
WhsTbl likeds(WhsLookup_t) dim(3) pos(1);
end-ds;


And in case it wasn't obvious, you would lookup by WhsTbl(x).Whs
and when you get a hit, you use WhsTbl(x).Duns to get the DUNS
number for the matching warehouse.


Oops, I forgot to include the "qualified" keyword. Here is a live
running example -- but without the additional blank space that makes it
more readable..

dcl-ds Match_Entry qualified template;
Ind char(1);
Code char(6);
end-ds;

dcl-ds Match qualified;
*n char(7) inz('E200000');
*n char(7) inz('P100000');
*n char(7) inz('R400000');
Entry likeds(Match_Entry) dim(3) pos(1);
end-ds;

idx = %lookup(iGroup: Match.Entry(*).Ind);
if idx = *zero; // if industry not found
iSequence = iGroup; // categorize by industry group
else; // else use assigned IPIC code
iSequence = Match.Entry(idx).Code;
endif;


Sincerely,

Dave Clark

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.