940 pts.
 CHECK & SCAN IN AS/400
What would be output of follwing calculations in rpg/400 code? XYZ SCAN ABCXYZ RESULT? XYZ CHECK ABCXYZ RESLT1? I mean to say what would be the values of result fields in above code.

Software/Hardware used:
ASKED: May 28, 2008  7:16 AM
UPDATED: June 24, 2008  1:07 PM

Answer Wiki:
Hi, Results would be :- XYZ SCAN ABCXYZ RESULT? = 4 (Factor 1 String is found starting at position 4 of Factor 2 String) XYZ CHECK ABCXYZ RESLT1? = 1 (First position of Factor 2 String is not found in Factor 1 String) You can easily try this sort of code out, just create a small program like this :- <pre> C 'XYZ' SCAN 'ABCXYZ' RES1 3 0 C 'XYZ' CHECK 'ABCXYZ' RES2 3 0 C RES1 DSPLY C RES2 DSPLY C MOVE *ON *INLR C RETURN </pre> Regards, Martin Gilbert.
Last Wiki Answer Submitted:  June 24, 2008  1:07 pm  by  Gilly400   23,625 pts.
All Answer Wiki Contributors:  Gilly400   23,625 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _