Uninitialized Rexx variables ... ( Object REXX is a s***...

Uninitialized Rexx variables ... ( Object REXX is a s***...

Post by rony » Thu, 20 Apr 2006 05:56:25

You are free to judge concepts the way you see them, of course, *but*: *if* you ever had read a book
about Rexx (like "The Rexx Language", aka "TRL", by the father of Rexx, Mike F. Cawlishaw) then this
would be no surprise whatsoever. It has to do with the "human centricness" that MFC tried to
incorporate into the language.

The basic rule is simple: everything in Rexx is a string. If you use a Rexx symbol like a name that
could be used as a variable name, then Rexx will use that symbol, unless it is used as a variable
and has a value assigned to it (in which case that value will be used). Or put in other words: if a
Rexx variable is uninitialized, then its name is used as its string value.

There is another basic rule one should know about Rexx: before the interpreter executes a Rexx
statement, all symbols outside of quotes are uppercased, multiple blanks between symbols are reduced
to one blank. (That is the reason why in Rexx the value of an uninitialized variable is its
uppercase string version, because the interpreter will get everything uppercased.)

Maybe, a third basic rule: a string that is not a Rexx statement does not automatically raise an
execution error. Instead that unknwon string is forwarded by Rexx to the program that invoked Rexx;
should that program not be able to execute a command as given in that string, a runtime error is
raised. (Many times it will be the command interpreter cmd.exe.)


Object Rexx improved that considerably and its error messages are very clear and helpful.

Also, if one does not like/intend to use uninitialized variables, one can tell Object Rexx to raise
an exception (cf. "NOVALUE") and interrupt the program.


1. RexxStart hits segmentation fault with Open Object Rexx but not with IBM Object Rexx

2. Running Object Rexx rexx.exe as a NT Service

Does anyone have a good example of running Object Rexx 2.1.3 rexx.exe as a NT Service. Specifically some things come to mind:

1) Setting the new service to only start after RxAPI service, considering a situation where this new service is set to auto-start.
2) Should rexx.exe end, the service is stopped so it could be restarted manually. (In the case of SrvAny, when the program ends, the SrvAny instance does not automatically stop. Instead SrvAny must
run a batch program which runs the other program, and if that program ends it issues a NET STOP on itself.)

I guess those are the main sharp spots that come to mind. Always interested in seeing working examples rather than going it alone. This kind of hack job (using SrvAny) will have to do until I an get a
real NT service program written which is basically a 'rexx.exe NT service' program.


Michael Lueck
Lueck Data Systems

Remove the upper case letters NOSPAM to contact me directly.

3. Very odd crash of rexx.exe (Object Rexx 2.1.2)

4. Reserved Words in REXX/Object REXX/NetRexx.

5. Catching Rexx syntax errors ( Object Rexx going Open Source

6. ad RexxSQL and different Rexx interpreters ( Installing oorexx on a system with IBM Object Rexx

7. Object Rexx stderr-redirection at run-time ( IIS REXX Debugging Question -

8. Linux, Cannot open REXX message catalog rexx.cat

9. just how much of the rexx package do i need to run vanilla rexx?

10. OT: RSS and e-mail, was New Rexx Book: Rexx Programmer's Reference

11. Rexx and Java ( Rexx Mindshare

12. PC REXX to mainframe REXX I/O

13. New Rexx Book: Rexx Programmer's Reference

14. Rexx math (was: Which REXX?)

15. REXX pgm calling another REXX pgm not on the PATH