A Quick-and-Easy Way to Convert Case in RPG Programs
November 4, 2009 Ted Holt
|
Several good ways exist to convert letters from uppercase to lowercase and vice versa. Some take more effort than others. Here’s a very easy RPG method that you may not have seen. Suppose a four-character program parameter is supposed to have one of three values: edit, post or both. Suppose further that you don’t want case to matter. The user can enter uppercase, lowercase, or mixed-case values. How do you go about testing the parameter in your program? You could do it the hard way, that is, test for all possible combinations, like this:
/free
if inOption = 'edit' or |


