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



Jeff Young wrote:
What I am looking for is a method to test conditions in a field I have already read from the file (or screen).
Basically a shortcut method using SQL instead of multiple and/or conditions in an IF statement.
ie: Test field Order_Line_Code for values 'MS', M1',MO','LS' ....
In SQL, I can just list the values to test using the IN condition, but in RPG I would have to test each value separately.
I do not know if this can be done, but figured that if it could, than this list was the place to find out.
%LOOKUP works very well for this. SETLL isn't too bad, either, especially if the codes can change. If you start hardcoding lists of values in SQL statements, you're setting yourself up for a maintenance nightmare down the road.

Joe

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.