The power of REXX is often overlooked by many people as to how much benefits one can receive by using a command based language. REXX which stands for restructured extended executor was created to offer an easy way to ask the operating system to perform a special task without writing hundreds or sometimes thousands of lines of computer code to do the same task. The simplicity of REXX is by far its strongest point along with its ease of use. REXX provides the facility for the Workplace Shell to create, modify, and delete objects in a very simplistic way.
REXXUTIL is a dynamic link library (REXXUTIL.DLL) that provides specific functionality to the Workplace Shell, which allows manipulating Workplace Shell classes as well as objects. A complete description of the commands can be found in the OS/2 Command Reference or the online version which is located in the OS/2 Information folder.
To use a REXXUTIL function in a REXX program, you must first register the function using RxFuncAdd. However, you have the choice of either registering one function using RxFuncAdd or you can register all functions by first registering SysLoadFuncs using RxFuncAdd. The following example shows how to register a single function:
call RxFuncAdd 'SysSetObjectData', 'RexxUtil', 'SysSetObjectData'
The function SysSetObjectData is the only function in this case that is registered by RxFuncAdd. The following example shows how to register all of the functions using RxFuncAdd:
call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs' call SysLoadFuncs
Using SysLoadFuncs allows all of the OS/2 sessions to use the REXXUTIL functions.