Page 1 of 1

Handling upper case letters in REXX.

Posted: Fri Feb 05, 2016 2:52 pm
by Hemlata P
Hi,

I am not that well versed with Rexx but I am trying to automate a process using this. In one of such REXX program, user will pass a name (host or domain name), REXX will fetch these details. The problem that I am facing is that the input file where the REXX takes the input detail is supposed to be in small letters. But while running the REXX if any input is in capital letter then REXX does not understand it and leaves an error.

I checked in REXX manuals but could not locate a inbuilt function to do this task. Can someone please help me solving this issue.

Re: Handling upper case letters in REXX.

Posted: Fri Feb 05, 2016 3:18 pm
by enrico-sorichetti
experiment with

Code: Select all

/* parsing in lower case and processing after */
parse arg args
say "with 'parse'           "">"args"<"

uppr = translate(args)
say "with code (translate)  "">"uppr"<"
parse upper var args uppr
say "with code (parse)      "">"uppr"<"

/* parsing in UPPER case directly  */
parse upper arg args
say "with parse upper       "">"args"<"
and the info about upper and lower case processing IS in the manuals

the best way to deal with variables is

Code: Select all

upper = translate(lower)