|
What I am looking for is a method to test conditions in a field I have already read from the file (or screen).%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.
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.
As an Amazon Associate we earn from qualifying purchases.
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.