Examples of all operation codes are in the <a href="http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/books/sc092508.pdf">ILE RPG Reference manual</a>. That's where we look up every question like this.
Tom
====================================================
I use this routine for lookup requests on entry fields. The program called is a popup window of valid entries.
d POS S 3 0
C EVAL POS = %SCAN('?': ECUST )
C IF POS <> 0
c call 'RVEH600W7'
C PARM ECUST
C END
Last Wiki Answer Submitted: July 31, 2010 11:00 am by Modiyooch540 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
Here are some samples
C EVAL findThis = 'bat'
C Eval findIn = 'battery'
C findThis Scan FindIn
C if %found
C** do something here
C endif
C EVAL findThis = 'bat'
C Eval findIn = 'battery'
C findThis Scan FindIn Location
C if %found and Location = 1
C** do something here
C endif
C EVAL findThis = 'bat'
C Eval findIn = 'battery'
C Eval Location = %SCAN(findThis:findIn)
C if Location = 1
C** do something here
C endif
But if find in were 'bottle' or 'Battery' string 'bot' would not be found