Jump to content

REXX Tips & Tricks:Troubleshooting

From EDM2
Revision as of 16:09, 14 December 2012 by Martini (talk | contribs)

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/

General REXX Errors

Object REXX Errors

Errors in REXXUTIL functions

WPS related Errors


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.

DLL loading failed

SYS1801

REX0003: Program is unreadable

1 +++ @REXX g + ? OS / 2 REXXSAA 6.00 12 Jul 1995

Error: Failure during initialization

SYS0008

Example for the SYS0008 error

Workaround for the SYS0008 error

SYS0008 - 2 -

REXX programs without an extension

SYS0192 or SYS0008 using PIPEs

SYS0005: Access is denied

SYS0317: The system cannot find message 32799 in message file OSO001.MSG

EXPOSE does not work as expected