How to validate data in RPG code like if a field is of char type then how to validate that it should only take alphabets.....
+1
A:
You can restrict input to arbitrary subset of characters using %check() build-in function. Below is essential fragment of ILE RPG Reference Manual:
%CHECK(comparator : base {: start})
%CHECK returns the first position of the string base that contains a character that does not appear in string comparator. If all of the characters in base also appear in comparator, the function returns 0.
karol.mlot
2010-03-23 14:27:51