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



I've done that too, but if there are a lot of cases like that I might nest 
another select statement.
(I haven't used Select to much in RPG IV yet, so if my syntax is off forgive me)

Select
When Useflag = '0';
   Select
   When Nbr1 = 123;
   ... code ...
   When Nbr1 = 456;
   ... code ...
   Other;
   ... code ...
   EndSl;
When Useflag = '1';
... code...

but if it's just a few then I will code it the same way you did.  Explicit 
instead of Implicit is good, in my book (which I've yet to write <g>)

Regards,

Jim Langston

-----Original Message-----
From: Alan Cassidy [mailto:acassidy@pioneermetals.com]

I'm going to confess here that this is why I even add a little redundancy
sometimes to my SELECT...WHEN... statements. That is,

When Useflag = '0' and Nbr1 = 123
...code...
When Useflag = '0' and Nbr1 <> 123
...code...

instead of

When Useflag = '0' and Nbr1 = 123
...code...
When Useflag = '0'
...code...

Which will do the same thing, expecially when there is lots of code in
between. (But not all the time).

Is that OK with youse guys? Or am I violating some sacred principle of
programming here?


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.