![[Toc]](../../toc.gif)
![[Index]](/idx.gif)
New REXXUTIL functions in Object REXX
The new Object-Oriented REXX contains an enhanced REXXUTIL DLL. This DLL
exports a lot of new functions in addition to the normal REXXUTIL DLL (see
below).
You don't need to install Object-Oriented REXX to use its enhanced
REXXUTIL DLL. The DLL also runs under Classic REXX in OS/2 WARP 3 and OS/2
WARP Version 4. (Note that the default REXX interpreter in OS/2 WARP 4 is
still Classic REXX!)
Use one of the following methods to use the new REXXUTIL.DLL in Classic
REXX when Classic REXX is your default (i.e., currently installed) REXX.
Using the new REXXUTIL.DLL as default REXXUTIL.DLL
To use the new REXXUTIL.DLL as the default REXXUTIL.DLL with Classic REXX,
rename the original REXXUTIL.DLL to something like REXXUTIL.BAK. Then copy
the file REXXUTIL.DLL (and REXXCRT.DLL in OS/2 WARP 3) from
Object-Oriented REXX to the OS/2 DLL directory \OS2\DLL and reboot.
Note that in OS/2 WARP Version 4 the new REXXUTIL.DLL is named
OREXUTIL.DLL when Classic REXX is the default REXX interpreter. (When
Object-Oriented REXX is installed as the default REXX, OREXUTIL.DLL is
automatically renamed to REXXUTIL.DLL and the corresponding DLL for
Classic REXX becomes CREXUTIL.DLL)
That's it.
Using only the new functions from the new REXXUTIL.DLL
To use only the new functions from the new REXXUTIL DLL, copy the
REXXUTIL.DLL from Object-Oriented REXX into a new directory, for example
C:\OREXX.
In OS/2 WARP 3 you must also copy the DLL REXXCRT.DLL from Object-Oriented
REXX into the OS/2 DLL directory; in OS/2 WARP Version 4 this DLL already
exists in the OS/2 DLL directory.
To use a function from the new REXXUTIL DLL, simply load it using
<RxFuncAdd. You must use the <RxFuncAdd statement for every function from
the new REXXUTIL.DLL you need -- you cannot use <SysLoadFuncs! It's also
important in this case that you use the fully qualified name for the DLL
in the <RxFuncAdd statement!
Example:
/* To show how we can have the REXXUTIL DLL for Classic REXX loaded */
/* as the default and -- at the same time -- use the new functions of */
/* the Object REXX DLL, in this example we'll first load REXXUTIL */
/* from Classic REXX. (This first step is not required every time you */
/* call a function from Object REXX's REXXUTIL.) */
/* load the REXXUTIL DLL from Classic REXX */
call RxFuncAdd "SysLoadFuncs", "REXXUTIL", "SysLoadFuncs"
call SysLoadFunc
/* load the functions SysBootDrive and SysProcessType from the new */
/* REXXUTIL DLL */
/* (assuming the new REXXUTIL.DLL is in the directory C:\OREXX) */
call RxFuncAdd "SysBootDrive", "c:\orexx\rexxutil", "SysBootDrive"
call RxFuncAdd "SysProcessType", "c:\orexx\rexxutil", "SysProcessType"
Following is a list of the new functions in the REXXUTIL.DLL from
Object-Oriented REXX (Please note that the following links will only work
if Object REXX is the default REXX interpreter on your system!):
<SysAddRexxMacro
add a routine to the REXX macro space
<SysClearMacroSpace
clear the REXX macro space
<SysDropRexxMacro
remove a routine from the REXX macro space
<SysLoadRexxMacroSpace
load a function into the REXX macro space
<SysQueryRexxMacro
query the existence of a macro space function
<SysReorderRexxMacro
change the order in the REXX macro space
<SysSaveRexxMacroSpace
save the REXX macro space
<SysCreateEventSem
create or open an OS/2 event semaphore
<SysOpenEventSem
open an OS/2 event semaphore
<SysPostEventSem
post an OS/2 event semaphore
<SysResetEventSem
reset an OS/2 event semaphore
<SysWaitEventSem
wait on an OS/2 event semaphore
<SysCloseEventSem
close an OS/2 event semaphore
<SysBootDrive
get the OS/2 boot drive
<SysFileSystemType
get the name of the file system for a drive
<SysQueryEAList
retrieve a complete list of EA names
<SysElapsedTime
use the OS/2 high-frequency timer service
<SysCreateMutexSem
create or open an OS/2 mutex semaphore
<SysOpenMutexSem
open an OS/2 mutex semaphore
<SysCloseMutexSem
close an OS/2 mutex semaphore
<SysReleaseMutexSem
release an OS/2 mutex semaphore
<SysRequestMutexSem
request an OS/2 mutex semaphore
<SysGetCollate
get the country-specific collating table
<SysMapCase
perform national language uppercase mapping of a string
<SysNationalLanguageCompare
compare two strings using a country-specific collating table
<SysProcessType
get the type of the process in which the REXX program is running
<SysSetPriority
change the priority of the current process
<SysQueryProcessCodePage
query the current code page for the process
<SysAddFileHandle
get and set the number of file handles
<SysSetFileHandle
set the number of file handles available to the current process
<SysSetProcessCodePage
change the current code page for the process
<SysShutdownSystem
shut down the OS/2 system
<SysWildCard
produce an OS/2 edited file name using a source name and a wild card
pattern
---------- * ----------
The updated version of Object REXX from 11 Nov 1997 (see Object REXX for
OS/2) contains some additional new REXXUTIL functions. (Please note that
the following links will only work if the Object REXX from 11 Nov 1997 is
the default REXX interpreter on your system!) These additional functions
are:
<SysQueryExtLibPath
query the value of BEGINLIBPATH/ENDLIBPATH
<SysSetExtLibPath
set the value of BEGINLIBPATH/ENDLIBPATH
<SysQuerySwitchList
query the task list
<SysSwitchSession
switch to a specific session
Also new in this version of REXXUTIL is the ability to use the <Sysini
function in non-PM environments. To do this, the new DLL SHPIINST.DLL
must be in the LIBPATH.
---------- * ----------
The updated version of Object REXX from 18 May 1999 (see Object REXX for
OS/2) contains some additional new REXXUTIL functions. (Please note that
the following links will not work even if the Object REXX from 18 May
1999 is the default REXX interpreter on your system because the functions
are not documented in the INF file! see Documentation for the new
REXXUTIL functions) These additional functions are:
<SysDumpVariables
Dump the contents of all variables
<SysGetFileDateTime
Get the date of a file or directory
<SysSetFileDateTime
Set the date of a file or directory
<SysStemCopy
Copy a stem
<SysStemDelete
Delete one or more entries in a stem with numbered index
<SysStemInsert
Insert an entry in a stem with numbered index
<SysStemSort
Sort a stem
<SysUtilVersion
Retrieve the REXXUTIL version
<SysVersion
Retrieve the OS version in string format
Warning: According to some messages on CompuServe the REXXUTIL DLL from
the beta versions of Object-Oriented REXX are not fully
compatible with the normal REXXUTIL DLL!
But now that the Special Edition of Object-Oriented REXX is
available at the Net for free you shouldn't use the Beta
anyway.
Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs