|
Jeff: <snip> I just encountered a line of code I have never seen before and can't figure out exactly what it is doing. C EVAL *INU1 = DETSTY = '1' </snip> What you are seeing is a Boolean expression. The line of code is not setting both values to '1' (*ON). It is only setting the indicator *INU1 to *ON if the statement DETSTY = '1' is true. An equivalent but slightly clearer statement would be: C EVAL *INU1 = (DETSTY = '1') I'm not sure when this became valid in RPGLE, but would guess at least V5. I like to use it when processing SQL statements during a fetch-loop: eof-this-file = (sqlstt <> *zeros); The field eof-this-file is defined as an indicator (type N) and is turned *ON when field sqlstt is some value other than zeros. Hope this helps, --Bruce Guetzkow
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.