Have to say that I agree 100% with @Phil (other than that I have only been coding Rexx for about 25 years).
The other problem with omitting SIGNAL ON NOVALUE is that you can code IF ARG(1) = FOOO ... and never realize that ARG(1) will never equal FOOO because the variable is really named FOO, and FOOO will always have a value of, well, 'FOOO'. The problem is compounded by the fact that Rexx is not compiled and so references to undefined variables only show up if you actually execute the code in question, which may not happen in testing. (I know, everyone on this list tests every code path, but some of our associates might forget once in a while.) If you have access to a Rexx compiler I recommend compiling any significant "production" Rexx code. You don't have to actually run the compiled Rexx -- it's just that the compiler will pick up problems like omitted or misspelled labels that the interpreter may miss. Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Phil Smith III Sent: Friday, May 22, 2020 5:48 PM To: [email protected] Subject: Re: Friday Follies/Why won't this work?/TSO Rant #387 Metz wrote: > Running with signal on novalue and quoting everything leads to hard-to-debug surprises errors when you get the case wrong (present example is typical.) ;-) After almost 40 years of writing Rexx, I've never had that problem. Quoting literals avoids far more problems than it causes, as does SIGNAL ON NOVALUE. You want hard-to-debug surprises, try not quoting a literal and then having someone define a variable that happens to match your literal token. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
