I have a REXX parameter string in this format:
arg = 'update summary(A summary of something) description(The description)'
and I'm parsing out the mode, summary and description as follows:
parse upper var arg mode . ,
1, 'SUMMARY('summary')' .,
1, 'DESCRIPTION('description')' .
I convert the arg to upper-case so that the SUMMARY and DESCRIPTION keywords are effectively case-insensitive (the user can code Summary or SUmmAry or sUmMaRy etc) but of course now I've just translated my actual summary and description to upper-case.
How can I make the parsing case-insensitive for the keywords, but keep the correct case for the actual parameters?
I've thought about extracting the character positions of the keywords and using them in the PARSE statement instead of '1' etc, but want a simple concise process if possible.