Errors Undefined Vars

It is not a syntax error to use undefined variables in REXX. Undefined variables are defined to have their own name translated to uppercase as their value. As a result it is often difficult to find programming errors that are a result of using undefined variables.

Some tips:

  • Add a SIGNAL ON NOVALUE statement to the main section of your programs. This will cause the system to issue a syntax error if you use an undefined variable.
  • Be careful to include the period when referring to stems. The variables "A" and "A." are unrelated.
  • Misspelled commands will often be interpreted as undefined variables. The line:

    sy 'hello'

    (which should be "say 'hello'") will be interpreted as:

    "SY" || " " || 'hello'

    and will be sent to the default command host for execution.