| Table 4 - REXXUTIL functions |
| Screen |
| | SysCls() |
| | SysCurPos() |
| | SysCurState() |
| | SysTextScreenRead() |
| | SysTextScreenSize() |
| | |
| File System |
| | SysDriveInfo() |
| | SysDriveMap() |
| | SysFileDelete() |
| | SysFileSearch() |
| | SysFileTree() |
| | SysMkDir() |
| | SysRmDir() |
|
| | SysSearchPath() |
| | SysTempFileName() |
| | |
| WPS Manipulation |
| | SysCopyObject() * |
| | SysCreateObject() |
| | SysCreateShadow() * |
| | SysDeregister ObjectClass() |
| | SysDestroyObject() |
| | SysMoveObject() * |
| | SysOpenObject() * |
| | SysQueryClassList() |
| | SysRegister ObjectClass() |
|
| | SysSaveObject() * |
| | SysSetIcon() |
| | SysSetObjectData() |
| | |
| Miscellaneous System Functions |
| | SysDropFuncs() |
| | SysGetEA() |
| | SysGetKey() |
| | SysGetMessage() |
| | SysIni() |
| | SysOS2Ver() |
| | SysPutEA() |
| | SysSleep() |
| | SysWaitNamedPipe() |
|
Graphical User Interface (GUI), or Presentation Manager, programming is available
with VX-REXX from WATCOM Systems,
VISPRO REXX from Hockware, or Gpf REXX from
Gpf Systems. There are also numerous APIs available as either freeware, shareware, or
commercial products that further enhance REXX with OS/2. Quercus Systems produces the
REXXLIB module and
SoftNet distributes the GammaTech SuperSet/2 package both
commercial offerings which provide a wide range of system-related functions, math routines,
and file system functions. Also, the YDBAUTIL group of functions is available as rxu1a.zip.
Various other specialty APIs can be found on file repositories around the world. Some
of the more popular function modules provide asynchronous communications, data base
interfaces, high precision mathematical routines as well as some diverse specialty routines.
Using the Warp Internet Access Kit, you can "surf" the net looking for additional REXX
APIs, many of which are free. As well as the other Internet addresses that have already been
listed, the following are known to be REXX repositories: rexx.uwaterloo.ca/pub/freerexx,
and ftp.cfsrexx.com/pub.
Correction
In last month's column, I published some wrong information about one of the five new
REXXUTIL functions introduced in Warp. The error resulted from some ambiguous
information released by IBM's Glendale Lab - the REXX development group.
The following is a corrected version of the definition of the SysSaveObject()
function.
| SysSaveObject( object_name, timing_flag ) |
| |
Returns 1 if the WPS object object_name was
successfully saved; otherwise, returns 0. File system
objects (WPFileSystem) are saved in the file system's
extended attributes and abstract objects are saved in the
OS2.INI (user) file. Transient objects (WPTransient)
cannot be saved.
Object_name can be a WPS object ID (the unique string
preceded with a '<' and terminated with a '>') assigned
to the object when it was created (e.g.
) or a fully qualified file name.
Timing_flag can be 0 (Boolean false - object is to be
saved synchronously) or 1 (Boolean true - object is to
saved asynchronously). If an asynchronous save is
specified, the object will be saved on a separate thread
("lazy written"); this is the preferred method for saving.
Otherwise, the object is saved on the user interface
thread.
|
Warp / REXX Mystery Failures
There has been a "fix" in Warp Version 3 implemented by IBM that is subtly causing
REXX programs, that ran with prior versions of OS/2, to fail. The culprit is the lack of file
handles in the OS/2 session where the REXX program is running.
The default number of file handles, a resource required for each open file, is, and has
been, twenty. Of the twenty, fifteen are available for user programs with five being reserved for
system-related files. Prior to Warp Version 3.0, when multimedia support was installed it
changed the default for the number of file handles from twenty to eighty. Apparently, this was
being done without the knowledge of the kernel developers and they deemed it necessary to
"correct" this problem.
The end result is that if you have a REXX program that inadvertently references file
with any of the input/output (I/O) functions: CHARIN(), CHAROUT(), CHARS(), LINEIN(),
LINEOUT(), or LINES() or uses any library functions that do not close all of their files (for
example - the SysGetMessage() function); these programs may begin to fail. The only way to
prevent this from happening is to increase the number of file handles available in the particular
session where the program is running. This can be done with the GrowHandles() C function.
Quercus Systems has implemented this capability in their latest version of REXXLIB, a
commercial product that is available in a fully functional "demo" form from your favorite OS/2
BBS or repository. With the addition of rexxlib.dll, you can call the DOSFILEHANDLES()
function and specify the number of file handles you want to be available for that session. Once
the number of file handles has been increased, the larger number of file handles remain
available to that session until the session is closed.