To guarantee that a string is not converted to a number or assumed to be of graphic type, strings should be enclosed in the following: "'". Simply enclosing the string in single quotation marks does not work.
For example:
stringvar = '100'
causes REXX to set the variable stringvar to the string of characters 100 (without the single quotation marks). This is evaluated by the SQL/REXX interface as the number 100, and it is passed to SQL as such.
On the other hand,
stringvar = “'“100”'”
causes REXX to set the variable stringvar to the string of characters '100' (with the single quotation marks). This is evaluated by the SQL/REXX interface as the string 100, and it is passed to SQL as such.