|
(All variable fields described here are 1-character) I was somewhat surprised to find that C IF %scan( ACFLAG : 'ABC' ) does not compile, even at v5r2. I have to add a "> 0" test to make it work, i.e., C IF %scan( ACFLAG : 'ABC' ) > 0 I am trying to avoid the C ACFLAG SCAN 'ABC' C IF %FOUND Currently, I am looking at a block of code like this C IF ACFLAG = 'A' C AND ( W_WIPSTA = 'B' C OR W_WIPSTA = 'H' C OR W_WIPSTA = 'I' C OR W_WIPSTA = 'P') C AND ( W_BILTYP = 'C' C OR W_BILTYP = 'F' C OR W_BILTYP = 'R') and would like to simplify it thusly: C IF ACFLAG = 'A' C AND %scan( W_WIPSTA : 'BHIP') > 0 C AND %scan( W_BILTYP : 'CFR' ) > 0 (Actually, my example is simplified; I have more tests than that.) Is this understandable? At first glance, I found it confusing. I would much rather code this more like: C IF ACFLAG = 'A' C AND W_WIPSTA = ('B' 'H' 'I' 'P') C AND W_BILTYP = ('C' 'F' 'R') where multiple values in a parentheses set in an "if equal" test logically implies an OR grouping. Curious minds need to know... TIA, Dan __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com
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.