REXX Utilities API Documentation v1.2

Автор: Alexander Taylor

Дата: 2009

Источник: Alex Taylor

Скачать книгу в формате INF.

Скачать книгу в формате IPF.

The REXX Utilities Library (RexxUtil) is a REXX API designed to provide useful functions for interfacing with the operating system. It exists on all IBM REXX platforms, with a few differences.

The OS/2 version was originally documented in the OS/2 REXX reference book REXX.INF. This book has not been significantly updated since the release of OS/2 Warp 3, even though a large number of new functions have been added to the OS/2 RexxUtil library since that time. Many of these new functions were only described in the Object REXX documentation (OREXX.INF), even though they apply to Classic REXX as well. Furthermore, there are several additional functions that are not documented in any reference book, and are only described in the README files accompanying recent OS/2 releases and FixPaks.

Finally, the existing RexxUtil documentation tends to be rather cursory, and a number of subjects are poorly described (if at all).

Consequently, I have written a new reference book which describes all existing OS/2 RexxUtil functions in far more comprehensive detail than either REXX.INF or OREXX.INF. It includes:

  • Descriptions of all RexxUtil functions included in base OS/2 Warp 3 and Warp 4.
  • Descriptions of all new functions that were originally added for Object REXX and carried over into Classic REXX.
  • Descriptions of all new functions added in recent OS/2 FixPaks (previously described in READREXX.TXT).
  • Full syntax diagrams for all functions.
  • Detailed descriptions of some operations not well covered by IBM's documentation (such as extended attribute format).

All functions described in this document apply equally to both Classic and Object REXX.

RexxUtil (REXXUTIL.DLL) is a IBM library of REXX functions for interacting with the operating system. It is available, with minor differences, on most platforms where the IBM REXX interpreter is available, including OS/2, Windows, and Linux. This document describes the OS/2 version, and applies to OS/2 Warp 3 and all subsequent releases.   

RexxUtil includes routines for:
* Manipulating files and directories at the filesystem level.
* Manipulating classes and objects in the Workplace Shell.
* Performing screen input and output in OS/2 command prompts.
* Managing character-based input and output according to locale-specific rules.
* Accessing selected operating system functions for process management.
* Manipulating REXX stem variables.

This chapter describes all of the functions available in the RexxUtil library.   

Basic RexxUtil functions

The following RexxUtil functions are available in OS/2 Warp 3.0 and all subsequent versions.

RxMessageBox Display a Presentation Manager message box.
SysCls Clear the screen.
SysCopyObject Copy a WPS object.
SysCreateObject Create an instance of a WPS class.
SysCreateShadow Create a shadow of a WPS object.
SysCurPos Change and/or query the current cursor position within a VIO session.
SysCurState Display or hide the cursor within a VIO session.
SysDeregisterObjectClass Deregister a WPS class.
SysDestroyObject Delete a WPS object.
SysDriveInfo Return information about a disk (volume).
SysDriveMap Query the list of available drive letters.
SysDropFuncs Unload all RexxUtil functions.
SysFileDelete Delete a file.
SysFileSearch Search for a string within a file.
SysFileTree Find files with the specified criteria, and optionally change file attributes.
SysGetEA Read an extended attribute of a file.
SysGetKey Read the next key pressed.
SysGetMessage Retrieve a message string from a message file.
SysIni Manipulate OS/2 INI files.
SysMkDir Create a directory.
SysMoveObject Move a WPS object.
SysOpenObject Open a WPS object.
SysOS2Ver Query the OS/2 version number.
SysPutEA Write an extended attribute to a file.
SysQueryClassList Query the list of registered WPS classes.
SysRegisterObjectClass Register a WPS class.
SysRmDir Delete a directory.
SysSaveObject Save a WPS object.
SysSearchPath Search a path for a file specification.
SysSetIcon Set an object's icon.
SysSetObjectData Change the settings of a WPS object.
SysSleep Pause the current thread for the specified interval.
SysTempFileName Generate a temporary file name.
SysTextScreenRead Read characters from the screen within a VIO session.
SysTextScreenSize Query the size of the screen within a VIO session.
SysWaitNamedPipe Wait for a named pipe to become available.

Additional RexxUtil functions

The following additional functions were introduced in FixPak 35 for OS/2 Warp 3 and FixPak 6 for OS/2 Warp 4. Many of these actually originated with IBM Object REXX, but were subsequently added to the standard REXXUTIL library. Others were introduced to allow access to new operating system features.

SysAddFileHandle Increase the number of available file handles.
SysAddRexxMacro Add a function to the REXX macrospace.
SysBootDrive Return the system boot drive.
SysClearRexxMacroSpace Clear the REXX macrospace.
SysCloseEventSem Close an event semaphore.
SysCloseMutexSem Close a mutex semaphore.
SysCreateEventSem Create an event semaphore
SysCreateMutexSem Create a mutex semaphore.
SysDropRexxMacro Remove a function from the REXX macrospace.
SysDumpVariables Dump all variables in the current scope either to a file or to STDOUT.
SysElapsedTime Query and/or reset the high-resolution timer.
SysFileSystemType Query the filesystem of the specified volume.
SysGetCollate Return the collating sequence table for the specified country/codepage combination.
SysGetFileDateTime Return a file's date/time attribute.
SysLoadRexxMacroSpace Load saved macrospace functions from a file.
SysMapCase Convert a string to uppercase according to localization rules.
SysNationalLanguageCompare Compare two strings according to the specified collating table.
SysOpenEventSem Open the specified event semaphore.
SysOpenMutexSem Open the specified mutex semaphore.
SysPostEventSem Post the specified event semaphore.
SysProcessType Return the process type of the currently-running REXX program.
SysQueryEAList Query the list of extended attribute names associated with a file.
SysQueryExtLIBPATH Return the current value of the extended LIBPATH.
SysQueryProcessCodePage Query the codepage being used by the current process.
SysQueryRexxMacro Check for a routine in the REXX macrospace.
SysQuerySwitchList Query the contents of the window list.
SysReleaseMutexSem Release the specified mutex semaphore.
SysReorderRexxMacro Change the search order of a macrospace function.
SysRequestMutexSem Request the specified mutex semaphore.
SysResetEventSem Reset the specified event semaphore.
SysSaveRexxMacroSpace Save the REXX macrospace to a file.
SysSetExtLIBPATH Set the value of the extended LIBPATH.
SysSetFileDateTime Modify a specified file's date/time attribute.
SysSetFileHandle Set the number of available file handles for the current process.
SysSetPriority Set the priority of the current process.
SysSetProcessCodePage Set the codepage for the current process.
SysShutDownSystem Shut down the operating system.
SysStemCopy Copy items from one stem variable to another.
SysStemDelete Delete selected items from a stem variable.
SysStemInsert Insert a new item into a stem variable at the specified position.
SysStemSort Sort items within a stem variable.
SysSwitchSession Make the specified program the active session.
SysUtilVersion Return the current version number of the RexxUtil library.
SysVersion Return a string identifying the name and version of the operating system.
SysWaitEventSem Wait on the specified event semaphore.
SysWaitForShell Wait until the WPS has initialized.
SysWildCard Transform a filename according to a wildcard pattern.