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



Hi Peter, 

Just to "clarify" also, I do consider this construct clear, and personally find 
it easier to work with than the long if--then--end multiple lines:

NamedIndicator = (Value1 = Value2)

...because indicator variables are just like any other variables, they are 
values stored at some location in storage. If you can get used to:

NamedIndicator = (Not NamedIndicator)

then you can get used to the other above expression. 

--Alan

+++++++++++++++

-----Original Message-----
Peter.Colpaert@xxxxxxxxx
Alan, I agree that clarity is to be prefered. 

Your construct has the additional advantage that you have minimal 
maintenance to do if one day you need to cater for Field1 = 'B' etc.

I always view over-complex, un-intuitive statements in programs as (job) 
security by obscurity.

Just my opinion of course.

Peter Colpaert

++++++++++++++++++++++

It seems clear to me, I was delighted when I saw Guthrie's pointer on 
iseriesnetwork that you could do that. I might avoid it for the next guy, 
though, a lot of times I do things for clarity in maintenance.

Like: 

select 
when Field1 = 'A'
...do this....
when Field1 <> 'A'
...do something else...
endsl 

--Alan


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.