Comprehensive rules for variables, constants, and literal strings are contained in the Open Object Rexx: Reference.
Rexx imposes few rules on variable names. A variable name can be up to 250 characters long, with the following restrictions:
The first character must be A-Z, a-z, !, ?, or _ . Rexx translates lowercase letters to uppercase before using them.
The rest of the characters may be A-Z, a-z, !, ?, or _, ., or 0-9.
The period (.) has a special meaning for Rexx variables. Do not use it in a variable name until you understand the rules for forming compound symbols.
The variable name can be typed and queried in uppercase, mixed-case, or lowercase characters. A variable name in uppercase characters, for example, can also be queried in lowercase or mixed-case characters. If you query a variable name that has not yet been set, the name is returned in uppercase characters.
Literal strings in Rexx are delimited by quotation marks (either ' or "). Examples of literal strings are:
'Hello' "Final result:"
If you need to use quotation marks within a literal string, use quotation marks of the other type to delimit the string. For example:
"Don't panic" 'He said, "Bother"'
There is another way to do this. Within a literal string, a pair of quotation marks (the same type that delimits the string) is interpreted as one of that type. For example:
'Don''t panic' (same as "Don't panic" ) "He said, ""Bother""" (same as 'He said, "Bother"')