REXX Tips & Tricks:Troubleshooting
his section contains hints for some REXX errors, symptoms, and messages. Note that a lot of hints in this section are captured from CompuServe messages.
In addition to the tips mentioned below I suggest everyone having problems with REXX programs should get the new Object-Oriented REXX. Object-Oriented REXX has much more descriptive error messages and the documentation is better than the normal REXX online documentation.
Another good source for Troubleshooting information is the Common REXX Pitfalls page on the home page of Quercus Systems (see Internet - Web Pages)
Note that the information related to various APARs is included in the sections General hints for REXX, REXXUTIL functions and Change the WPS with REXX. See those sections for additionan information.
Here's a list of further sections in REXX Tips & Tricks with information about various errors:
Errors in OS/2 commands http://www.edm2.com/index.php/
- CTRL-Break &OS/2 commands
- STDOUT / STDERR
- Using PIPEs
- The CMD command
- The COPY command
- Copying empty files
- The XCOPY command
General REXX Errors
Object REXX Errors
- The function CHARS() in Object REXX
- The function LINEOUT() in Object REXX
- The function LINES() in Object REXX
- The function STREAM() in Object REXX
- The function VALUE() in Object REXX
- The Signal handling in Object REXX
Errors in REXXUTIL functions
- The function SysCopyObject()
- The function SysCreateObject()
- The function SysFileSearch()
- The function SysIni()
- The function SysQueryClassList()
- The function SysSearchPath()
WPS related Errors
- Format of the RC files for MAKEINI
- Creating shadows of drive objects
- Changing the LaunchPad
- WPS Object Setup strings (and the sub sections)
No light, no sound
Problem: The call of a REXX program neither produces the expected result nor an error message.
Hint: Check if the file REX.MSG (normally in the directory C:\OS2\SYSTEM) is in a directory included in the environment variable �DPATH. This file contains the error messages for the REXX Interpreter.
RC = 1041 or RC = 1002
Problem: The call of an OS/2 program leads to the error code �SYS1041 or �SYS1002, although the called OS/2 program is available through the environment variable �PATH.
Hint: Check the value of the environment variable COMSPEC.
It runs, runs not, runs, runs not, ...
Problem: A REXX program works sometimes and sometimes not.
Hint: If the program uses file I/O, check if you're closing all opened files. The number of file handles is limited in an OS/2 session. (see MaxFH on how to increase the number of file handles; see lsof for getting a list of all open files)
Please note that the entry FILES=nn in the file CONFIG.SYS is only valid for DOS sessions!
What the hell is he doing?
Problem: The results of a REXX program aren't as expected.
Hint: Turn the NOVALUE condition on. (see �SIGNAL)
Haeaeh -- Syntax error?
Problem: The execution of a REXX program leads to mysterious syntax errors.
Hint: Check the file for unbalanced comment chars. A simple way to do that is: Use the find-and-replace-function of your editor to replace the string "/*" with "/*" and the string "*/" with "*/". The number of changes for both calls should be equal. If not, there's an unbalanced comment in your file.
Another method to detect unbalanced comment chars: Use an editor with syntax highlighting.
See also: Using comments
2 + 2 = 5
Problem: The results of mathematical expressions aren't as expected.
Hint: Change the �NUMERIC settings to a greater value.