home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Professional
/
OS2PRO194.ISO
/
os2
/
prgramer
/
rexx
/
rexxtr
/
rxextras.inf
(
.txt
)
< prev
next >
Wrap
OS/2 Help File
|
1994-02-02
|
98KB
|
3,720 lines
ΓòÉΓòÉΓòÉ 1. Introduction ΓòÉΓòÉΓòÉ
About...
Installation
REXX Registration
REXX Deregistration
REXX Registration Tips
ΓòÉΓòÉΓòÉ 1.1. About... ΓòÉΓòÉΓòÉ
This is version 1.9 of RxExtras, released in February, 1994.
RxExtras is a set of functions to enhance OS/2's REXX programming language, and
is accompanied by additional functions to be used by other PM Rexx-based
software (VisPro/Rexx and VX-Rexx, among others). Some of the functions
provided by RxExtras can be accomplished by various other means using "pure"
OS/2 REXX code, but RxExtras provides an easier interface and more efficient
processing.
Take the RxSort() function as an example. You can certainly write REXX code to
write a stem to a file, run the external SORT program, and read the sorted data
back into a stem. The RxSort() function of RxExtras saves a lot of disk I/O;
1. writing the stem to disk.
2. the SORT program reading the file from disk.
3. the SORT program writing the file back to disk.
4. reading the sorted file back into a stem.
Plus, with RxSort(), you only need 1 line of code to accomplish the entire
task!
Once RxExtras is registered to your REXX interpreter, you can take advantage
of any RxExtras functions in your existing and future REXX-based programs.
ΓòÉΓòÉΓòÉ 1.2. Installation ΓòÉΓòÉΓòÉ
To install RxExtras, place the RxExtras.DLL file in any subdirectory which is
part of your LIBPATH statement (LIBPATH is found in your CONFIG.SYS file).
For example, you could place RxExtras.DLL in your x:\OS2\DLL subdirectory (by
default, x:\OS2\DLL is part of your LIBPATH when you install OS/2). However, it
is recommended that you place RxExtras.DLL in some other subdirectory. The
reason for this is that should you have to reinstall OS/2, RxExtras.DLL will
not automatically be reinstalled with OS/2. All REXX-based programs that
require RxExtras.DLL will fail until such time as you manually copy
RxExtras.DLL to your x:\OS2\DLL subdirectory.
A better, more flexible approach is to make a subdirectory (preferably on a
drive other than where OS/2 is installed) for all your add-on *.DLL files,
which includes RxExtras.DLL. For example, make a subdirectory called
y:\USER\DLL and place RxExtras.DLL in there. Then, edit your CONFIG.SYS file,
and add ";y:\USER\DLL" to the end of your LIBPATH. Save CONFIG.SYS and reboot
(you must reboot in order for this last change to take effect). Once you've
done this, you will never have to modify CONFIG.SYS again, no matter what *.DLL
file you add to your system. Just place your new *.DLL file in y:\USER\DLL,
and the system will automatically find it when needed.
After installing RxExtras, you must register the APIs in order to use them.
ΓòÉΓòÉΓòÉ 1.3. Registering RxExtras ΓòÉΓòÉΓòÉ
In order to use any REXX features of OS/2, you must have installed the REXX
Interpreter. When you installed OS/2, you may have chosen to not install REXX.
If this is the case, open your Selective Install icon and install REXX before
continuing.
In order to take advantage of RxExtras' REXX APIs found in RxExtras.DLL, you
must first "register" the APIs with OS/2's REXX Interpreter. This is true of
any and all REXX-based *.DLL files. The process is rather simple. In your
*.CMD file (or within your PM REXX-Based program), simply code these 2 lines:
Call RxFuncAdd 'RxExtra', 'RxExtras', 'RxExtra'
Call RxExtra 'Load'
Note: You must code these 2 lines so that they execute before any RxExtras
APIs are referenced elsewhere in your program.
Once you have done this, your REXX program can take full advantage of RxExtras'
APIs (functions). Additionally, all future sessions of REXX-based programs
will likewise have access to the RxExtras APIs. In other words, once these
APIs are registered, they have a global effect across your entire system; all
OS/2 REXX sessions will be able to use them. They stay registered until you
reboot or intentionally deregister them.
Double-click here for some tips and advice on REXX API registration techniques.
ΓòÉΓòÉΓòÉ 1.4. Deregistering RxExtras ΓòÉΓòÉΓòÉ
When you are through with the RxExtras APIs, it is possible to deregister them
from your system. The advantage to doing this is that the shared memory they
occupied will be released for other programs to use. The disadvantage is that
if you wish to use the APIs once more, they must be registered once more. This
requires some disk I/O activity to locate the RxExtras.DLL file and load its
contents into memory.
Warning: If you chose to deregister the RxExtras APIs the affect is global
across your entire system. No other REXX-based programs will have access to
the APIs and they will in all likelihood fail miserably!
To deregister the RxExtras APIs, simply code this line anywhere in any *.CMD
file or any other REXX-based program:
Call RxExtra 'Drop'
Upon execution of the above line, the APIs will be flushed from memory when the
system finds it convenient so to do.
Double-click here for some tips and advice on REXX API registration techniques.
ΓòÉΓòÉΓòÉ 1.5. Registration Tips ΓòÉΓòÉΓòÉ
A good technique for registering any and all REXX API packages (including
RxExtras) is as follows:
o Define a STARTUP.CMD file in the root directory of your OS/2 boot drive.
o Register, within STARTUP.CMD, any and all REXX API packages that you
frequently use.
o In each *.CMD file or REXX-based program that requires the API:
1. Test for the pre-registration of the API package and save the results
in a REXX variable.
2. If the test indicates that the API is not yet registered with REXX,
then register it according to the API package's instructions.
3. Just before exiting your program, if the status variable shows that the
API was not pre-registered, then deregister it.
This method ensures that:
1. Your *.CMD or REXX-based program has access to the APIs it requires.
2. Your REXX environment, in terms of the pre-registered APIs, is restored to
its native state before your program exits. This makes for a very well
behaved, tolerant program.
Specifically, for RxExtras:
In your x:\STARTUP.CMD file, place:
Call RxFuncAdd 'RxExtra', 'RxExtras', 'RxExtra'
Call RxExtra 'Load'
In all of your *.CMD and other REXX-based programs that require the RxExtras
APIs, place:
RxExtraAPI = RxFuncQuery('RxExtra')
If RxExtraAPI \= 0 Then
Do
Call RxFuncAdd 'RxExtra', 'RxExtras', 'RxExtra'
Call RxExtra 'Load'
End
before any other references to RxExtras APIs, and then just before your
program exits, use:
If RxExtraAPI \= 0 Then
Call RxExtra 'Drop'
Notice that registering your RxExtras APIs in the STARTUP.CMD file makes the
need for the per-program test of pre-registration superfluous. However, it is
a good programming practice to code these lines anyway.
One reason is that if you give a copy of your program to someone else to use,
they might not have registered the APIs in their STARTUP.CMD file.
Another reason is that since registration in STARTUP.CMD puts these APIs in
memory and leaves them there, you may decide (in the interest of saving
memory) to remove the pre-registration from STARTUP.CMD. If you do, and you
did not code the above tests (or you got a program from someone else and they
did not code the above tests), your programs will no longer execute.
CAUTION:
Never blindly assume you can deregister any API functions when your program
exits. A program that always deregisters the APIs when it quits only causes
problems for everyone that uses it. If you are going to include code that
deregisters an API (RxExtras or otherwise), you should do so only if you're
certain it was not pre-registered when the program started!
ΓòÉΓòÉΓòÉ 2. RxExtras Release Information ΓòÉΓòÉΓòÉ
About...
Release 1.9
Release 1.8
Release 1.7
Release 1.6
Release 1.5
Release 1.4
Release 1.3
Release 1.2
Previous Releases
ΓòÉΓòÉΓòÉ 2.1. About... ΓòÉΓòÉΓòÉ
This section has details on what is, or was, in each release of RxExtras.
You can determine the current release level of RxExtras by running the RxExtra
function when you are first registering RxExtras to REXX.
Double click on any of the releases on the left hand side to see information
pertaining to a particular release.
The sort of information that is displayed will be a list of functions added,
and any other miscellaneous work, such as parameter checking, or multiple
threaded-ness.
ΓòÉΓòÉΓòÉ 2.2. Release 1.9 ΓòÉΓòÉΓòÉ
The following functions were added in Release 1.9 of RxExtras:-
o RxKillProcess
o RxSetFileHandles
o RxAddFileHandles
o RxMatchWildCard
These functions were all provided by Leshek Fiedorowicz, along with an update
to the RXEXTRAS.CMD file. The help and VisPro/REXX object were done by dIon.
All functions that use window handles were improved so that VX-REXX HWnd's
could be passed in directly.
RxSort was improved so that you can sort a stem only on certain columns within
that stem.
VX-REXX Insert Code support was added, in the form of the RxExtras.MTC file.
ΓòÉΓòÉΓòÉ 2.3. Release 1.8 ΓòÉΓòÉΓòÉ
The following functions were added in Release 1.8 of RxExtras:-
o RxFileExists
o RxWindowQueryText
A bug with RxStemCopy was fixed. It was unnecessarily using up memory.
VisPro/REXX v2.0 support was added in the form of an object for the toolbar
which held all RxExtras calls and generated code using the VisPro/REXX drag
and drop event tree. See VPRxx toolbar object for more details.
ΓòÉΓòÉΓòÉ 2.4. Release 1.7 ΓòÉΓòÉΓòÉ
The following functions were added in Release 1.7 of RxExtras:-
o RxWindowSetFocus
o RxWindowSetOwner
Also, more code was added to support VX-REXX, and VX-REXX samples were added
to this INF file.
ΓòÉΓòÉΓòÉ 2.5. Release 1.6 ΓòÉΓòÉΓòÉ
The following functions were added in Release 1.6 of RxExtras:-
o RxNap
o RxEventCreate
o RxEventDestroy
o RxEventOccured
o RxEventWaitFor
o RxEventQuery
o RxEventReset
o RxResourceCreate
o RxResourceDestroy
o RxResourceQuery
o RxResourceRelease
o RxResourceRequest
The tables showing which function were for use with VX-REXX, VisPro/REXX and
'plain' REXX (at the top of each API definition) were updated to be correct.
The introduction was updated to reflect the correct version of RxExtras
ΓòÉΓòÉΓòÉ 2.6. Release 1.5 ΓòÉΓòÉΓòÉ
The following functions were added in Release 1.5 of RxExtras:-
o RxListBoxItemHandle
o RxQueueList
o RxQueueSetDefault
o RxQueueJobProperties
o RxQueueWriteStem
ΓòÉΓòÉΓòÉ 2.7. Release 1.4 ΓòÉΓòÉΓòÉ
The following functions were added in Release 1.4 of RxExtras:-
o RxSetIcon
o RxDrawBitmap
o RxSetClipboardText
o RxQueryClipboardText
o RxAppendClipboardText
o RxScrollListBox
o RxGetEXEName
The RxSetGlobal function was enhanced to accept valid REXX variable names and
support one call setting of global stems.
The RxGetGlobal function was enhanced to accept valid REXX variable names.
Note: You can not get global stems in one call using RxGetGlobal.
Also, the complete User's Guide you are now reading was included in the
package to replace the RxExtras.DOC, and RxExtras.VPR files. Many thanks to
Ric Naff for doing a lot of the work.
ΓòÉΓòÉΓòÉ 2.8. Release 1.3 ΓòÉΓòÉΓòÉ
The following functions were added in release 1.3 of RxExtras:-
o RxThread
o RxKillThread
o RxSuspendThread
o RxResumeThread
o RxChangeThreadPriority
o RxSetThreadClass
ΓòÉΓòÉΓòÉ 2.9. Release 1.2 ΓòÉΓòÉΓòÉ
The following function was added in Release 1.2 of RxExtras:-
o RxQueryClassName
Also the following miscellaneous work was completed:-
o A First cut INF file was included in the ZIP file.
o Parameter checking for all functions was enhanced.
o RxListBoxFromFile was made multithreaded.
o RxVarDump now dumps to a stem, rather than to STDOUT.
o RxExtra now returns the version number of RxExtras you have loaded or
dropped.
o RxVolumeLabel returns an error message if the drive tried is not valid.
o RxSwitchTo will match on any part of the string, not just a prefix.
o RxQueryDriveType will return "NOTREADY" for CDAUDIO or empty floppy drives.
ΓòÉΓòÉΓòÉ 2.10. Previously available (No release numbers) ΓòÉΓòÉΓòÉ
The following functions were available in previous releases of RxExtras that
had no release number :-
o RxMaximize
o RxMinimize
o RxRestore
o RxBootDrive
o RxRead
o RxWrite
o RxVolumeLabel
o RxVarDump
o RxStemCopy
o RxExtra
o RxSort
o RxSwitchTo
o RxQuerySwitchList
o RxQueryDriveType
o RxSearchPath
o RxSetGlobal
o RxGetGlobal
o RxLineCount
o RxListBoxFromFile
o RxListBoxToFile
o RxListBoxFromStem
o RxListBoxToStem
o RxGetListBoxCount
o RxGetItemFromListBox
o RxGetItemFromListBoxAtIndex
o RxAddItemAtIndex
o RxSetSpinButtonCharRange
o RxSetSpinButtonRangeFromStem
o RxSetSpinButtonRangeWithIncrement
o RxMorphButtonToIcon
o RxSearchItem
o RxQueryWindow
ΓòÉΓòÉΓòÉ 3. VPRxx - VisPro/REXX toolbar support. ΓòÉΓòÉΓòÉ
A new object for the VisPro/REXX toolbar (VPRxx) was uploaded to the HockWare
section of CompuServe. When installed, it places a new object on the
VisPro/REXX toolbar that represents RxExtras.
If you place this object on your form, you can use it in the event tree view to
get prototypes of all the RxExtras functions by dragging the object to the code
window. This means RxExtras is now easier to use! And the online help for all
the functions are available using the Help button of the Create Link dialog of
the RxExtras object.
If you have any suggestions, or are interested in other VisPro/REXX objects,
contact the author of RxExtras.
ΓòÉΓòÉΓòÉ 4. VX-REXX Insert Code... Support ΓòÉΓòÉΓòÉ
When coding using Watcom's section editor, you can use a popup menu to insert
commonly used code into your application.
You can add the RxExtras APIs to the Insert Code dialog if you wish to do so,
by simply copying the RxExtras.MTC file that comes with RxExtras to the
\VXREXX\SYSTEM directory.
Once the copy has been done, you can use the Insert Code menu item to get
prompted (and help assisted) support for coding RxExtras APIs in VX-REXX.
If youn have any suggestions for this feature, please contact the author of
RxExtras.
ΓòÉΓòÉΓòÉ 5. RxExtras APIs ΓòÉΓòÉΓòÉ
The listings for RxExtras APIs (functions) will designate which types of REXX
programs can take advantage of them. Each API will have a box at the top of
its description detailing in which environments it may be used:
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
If you see "OS/2 REXX" in the above box for a function, you may use that
RxExtras function in any *.CMD and/or other REXX-based program. If you do not
see "OS/2 REXX", then you cannot use the API in a *.CMD file.
If you see "VisPro/REXX" in the above box for a function, you may use that
RxExtras function in any VisPro/REXX program.
If you see "VX-REXX" in the above box for a function, you may use that RxExtras
function in any VX-REXX program.
APIs for VisPro/REXX and/or VX-REXX could possibly be used in other PM
Rexx-based programs. Some experimentation may be necessary.
ΓòÉΓòÉΓòÉ 5.1. Disc/File ΓòÉΓòÉΓòÉ
These APIs deal with accessing information to, from, or about discs and files.
Some of them are unique in that there are no standard REXX commands that will
retrieve the information for you; RxExtras must be used in these instances.
ΓòÉΓòÉΓòÉ 5.1.1. RxBootDrive ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXBOOTDRIVE()ΓöÇΓöÇΓöÇ
Returns the drive from which OS2 was booted in the format 'X'.
If you want a trailing ':' you must append one to the returned drive letter.
Example:
SAY 'My Boot Drive is' RxBootDrive() || ':'
Output:
My Boot Drive is C: /* perhaps */
ΓòÉΓòÉΓòÉ 5.1.2. RxLineCount ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXLINECOUNT(ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇfilenameΓöÇ)ΓöÇΓöÇΓöÇ
ΓööΓöÇdrive:ΓöÇΓöÿ ΓööΓöÇ\ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γöÿ
ΓööΓöÇpath\ΓöÇΓöÿ
Returns the number of lines in filename. The lines in filename are assumed to
be delimited by CR/LF characters.
If filename does not exist, RXLINECOUNT raises an 'Incorrect call to routine'
condition.
Example:
SAY 'There are' RxLineCount('C:\CONFIG.SYS') 'lines in Config.Sys.'
Output:
There are 117 lines in Config.Sys. /* perhaps */
ΓòÉΓòÉΓòÉ 5.1.3. RxListBoxFromFile ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 5.1.4. RxListBoxToFile ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 5.1.5. RxQueryDriveType ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXQUERYDRIVETYPE(drive:)ΓöÇΓöÇΓöÇ
Returns 'HPFS', 'FAT' or 'CDFS' for their respective drive types.
Returns 'NOTREADY' for the following conditions:
o A CD-ROM drive with an Audio CD loaded.
o An empty floppy drive.
o An invalid drive letter.
Example:
SAY 'Drive C: is a' RxQueryDriveType('C:') 'drive.'
Output:
Drive C: is a HPFS drive. /* perhaps */
ΓòÉΓòÉΓòÉ 5.1.6. RxRead ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 5.1.7. RxSearchPath ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXSEARCHPATH(ΓöÇΓöÇsearchpathΓöÇΓöÇ,ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇfilenameΓöÇ)ΓöÇΓöÇΓöÇ
ΓööΓöÇsubdir\ΓöÇΓöÿ
Searches for [ subdir\ ]filename in the path(s) defined by searchpath.
The path(s) defined for searchpath will be used for the search. searchpath may
be composed of several pathnames, each separated by a semicolon. Each pathname
is allowed to have either a drive designator, a directory designator, or both.
Currently, filename must specify a complete filename; no wildcard characters
are accepted. If you supply the optional subdir\ qualifier, the effect is as
if you had modified all the values of searchparh to include the addtional
subdir\ value. For example, if searchpath contains 'F:\OS2;G:\USER', and you
specify 'DLL\' for subdir,, the effect is the same as having specified
'F:\OS2\DLL;G:\USER\DLL' for searchpath and no value for subdir\.
RXSEARCHPATH returns a fully qualified filename if it finds one, otherwise it
returns NULL.
Example:
/* Find COUNTRY.SYS */
SchPath = 'C:\OS2\SYSTEM;D:\OS2\SYSTEM;E:\OS2\SYSTEM'
SAY RxSearchPath(SchPath,'COUNTRY.SYS')
Output:
D:\OS2\SYSTEM\COUNTRY.SYS /* if found in D:\OS2\SYSTEM */
ΓòÉΓòÉΓòÉ 5.1.8. RxVolumeLabel ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXVOLUMELABEL(drive)ΓöÇΓöÇΓöÇ
Returns the volume label for disc drive drive. If no label exists, it returns
'NO LABEL'.
Returns 'Error Querying drive label' for an invalid drive letter.
You may append an optional colon to the letter, but only the drive letter
itself is required.
Example:
SAY 'Volume Label of drive C is' RxVolumeLabel('C')
Output:
Volume Label of drive C is MY DRIVE C /* perhaps */
ΓòÉΓòÉΓòÉ 5.1.9. RxWrite ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 5.1.10. RxFileExists ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXFILEEXISTS(file)ΓöÇΓöÇΓöÇ
Returns '1' if the file specified exists, '0' otherwise.
RXFILEEXISTS will raise the REXX error condition INCORRECT CALL TO ROUTINE if a
filename is not passed.
Example:
If RxFileExists('C:\CONFIG.SYS') Then Say 'I found your CONFIG.SYS!'
Output:
I found your CONFIG.SYS /* perhaps */
ΓòÉΓòÉΓòÉ 5.1.11. RxSetFileHandles ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXSETFILEHANDLES(fileHandles)ΓöÇΓöÇΓöÇ
Returns an empty string ('') if the number of fileHandles available has been
raised to the new value.
The function can also return "Not enough memory", or "Invalid parameter" (when
trying to set the file handles to a value less than it currently is).
RXSETFILEHANDLES will raise the REXX error condition INCORRECT CALL TO ROUTINE
if fileHandles is not passed, or is not greater than 0.
Example:
If RxSetFileHandles(100) Then Say '100 file handles are now available'
Output:
100 file handles are now available /* perhaps */
ΓòÉΓòÉΓòÉ 5.1.12. RxAddFileHandles ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXADDFILEHANDLES(fileHandlesToAdd)ΓöÇΓöÇΓöÇ
RxAddFileHandles returns :-
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéReturn value ΓöéReason Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓöéA number ΓöéCurrent number of file handles availableΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
RXADDFILEHANDLES will raise the REXX error condition INCORRECT CALL TO ROUTINE
if fileHandles is not passed.
Example:
rc = RxAddFileHandles(100)
Say '100 more file handles are now available'
Say 'There are now 'rc' file handles available'
Output:
100 more file handles are now available
There are now 121 file handles available
ΓòÉΓòÉΓòÉ 5.2. REXX Environment ΓòÉΓòÉΓòÉ
These APIs deal with accessing information to, from, or about 1 or more REXX
Sessions. All of these functions are available only with RxExtras; there are
no REXX commands which will achieve the same results.
ΓòÉΓòÉΓòÉ 5.2.1. RxExtra ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXEXTRA(ΓöÇΓö¼ΓöÇ'LOAD'ΓöÇΓö¼ΓöÇ)ΓöÇΓöÇΓöÇ
ΓööΓöÇ'DROP'ΓöÇΓöÿ
Loads or Drops all functions in this package.
Returns the version number of RxExtras after loading or dropping.
Example:
rcy = RxFuncAdd('RxExtra', 'RxExtras', 'RxExtra')
Say 'Using version 'RxExtra("Load")' of RxExtras'
Output:
Using version 1.7 of RxExtras /* perhaps */
ΓòÉΓòÉΓòÉ 5.2.2. RxGetGlobal ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXGETGLOBAL(ΓöÇΓöÇvarnameΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Returns the value for varname, where varname was previously defined via
RXSETGLOBAL.
If varname was not defined via RXSETGLOBAL, RXGETGLOBAL returns NULL.
Example:
Call RxSetGlobal 'MyVar','Hello World!'
Say RxGetGlobal('MyVar')
Output:
Hello World!
ΓòÉΓòÉΓòÉ 5.2.3. RxSetGlobal ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXSETGLOBAL(ΓöÇΓöÇvarnameΓöÇ,ΓöÇvarvalueΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Sets a global variable value for use across all REXX sessions. A variable thus
set can be retrieved by any other REXX session via RXGETGLOBAL.
You can set a global stem from a local stem by passing the global stem name
(which must have a trailing period) for varname and passing the local stem name
(which also must have a trailing period) for varvalue.
Returns varvalue if successful.
Example:
SomeVar = 'MyVar'
Call RxSetGlobal SomeVar,'Hello World!'
Say RxGetGlobal('MyVar')
Output:
Hello World!
ΓòÉΓòÉΓòÉ 5.2.4. RxVarDump ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXVARDUMP(ΓöÇΓöÇ'stemname.'ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Copies all local variables to stemname for debugging. The trailing period is
required; results are unpredictable without it.
RXVARDUMP always returns NULL. The count of variables retrieved is placed in
stemname.0. Each unique variable is placed in a pair of variables,
stemname.n.name and stemname.n.value and may be displayed in a loop or by other
means.
Example:
XYZ = '123'
MyVar = 'Quick Brown Fox'
Call RxVarDump 'varlist.'
Do Count = 1 to varlist.0
Say varlist.Count.name 'has the value "'varlist.Count.value'"'
End
Output:
XYZ has the value "123"
MYVAR has the value "Quick Brown Fox"
ΓòÉΓòÉΓòÉ 5.3. REXX Stems ΓòÉΓòÉΓòÉ
These APIs deal with accessing information to, from, or about REXX Stem
variables. Some of them require PM REXX-based programs in order to function.
ΓòÉΓòÉΓòÉ 5.3.1. RxListBoxFromStem ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 5.3.2. RxListBoxToStem ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 5.3.3. RxQuerySwitchList ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 5.3.4. RxRead ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXREAD(ΓöÇΓöÇ'stemname.'ΓöÇ,ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇfilenameΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
ΓööΓöÇdrive:ΓöÇΓöÿ ΓööΓöÇ\ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γöÿ
ΓööΓöÇpath\ΓöÇΓöÿ
Reads filename into the stem variable stemname.. The trailing period to
stemname. is required; results are unpredictable if it is not supplied. RXREAD
assumes that the contents of filename are ASCII text, with each line terminated
by a CR/LF.
RXREAD always returns NULL if successful, and the count of lines retrieved is
placed in stemname.0. Each unique line of text is place in stemname.n and may
be displayed in a loop or by other means. If filename cannot be read, RXREAD
raises an 'Incorrect call to routine' condition.
Example:
Call RxRead 'textlines.','C:\Config.Sys'
Do Count = 1 to textlines.0
Say textlines.Count
End
Output:
PROTSHELL=C:\OS2\PMSHELL.EXE /* perhaps */
SET USER_INI=C:\OS2\OS2.INI /* perhaps */
. . .
ΓòÉΓòÉΓòÉ 5.3.5. RxSetSpinButtonRangeFromStem ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 5.3.6. RxSort ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXSORT(ΓöÇΓöÇ'stemname.'ΓöÇΓöÇΓö¼ΓöÇ[ΓöÇ,ΓöÇ'Ascending'ΓöÇ]ΓöÇΓö¼ΓöÇΓöÇ[,ΓöÇΓöÇstartΓöÇΓöÇ,ΓöÇΓöÇendΓöÇΓöÇ])ΓöÇΓöÇΓöÇ
ΓööΓöÇ[,ΓöÇ'Descending'ΓöÇ]ΓöÇΓöÿ
Sorts a stemmed variable stemname. in either Ascending or Descending ASCII
sequence. Only the A or D of the sort order is required. Ascending is the
default if omitted.
start and end default to the start and of the string if either is omitted.
The number of items to sort must be placed in stemname.0. All values to sort
must be in stemname.1 through stemname.n, where n is the number placed in
stemname.0.
RXSORT always returns NULL if invoked properly.
Example:
Stem.0 = 3
Stem.1 = 'Now is the time...'
Stem.2 = 'A stitch in time...'
Stem.3 = 'Somewhere in time...'
Call RxSort 'Stem.','A', 1, 3
Do Count = 1 to Stem.0
Say Stem.Count
End
Say '-----------------'
Call RxSort 'Stem.','D', 1, ""
Do Count = 1 to Stem.0
Say Stem.Count
End
Output:
A stitch in time...
Now is the time...
Somewhere in time...
-----------------
Somewhere in time...
Now is the time...
A stitch in time...
ΓòÉΓòÉΓòÉ 5.3.7. RxStemCopy ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXSTEMCOPY(ΓöÇΓöÇ'sourcestem.'ΓöÇΓöÇ,ΓöÇΓöÇ'targetstem.'ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Copies the entire contents of sourcestem. to targetstem.. The trailing period
to sourcestem. and targetstem. are required; results are unpredictable if they
are not supplied.
RXSTEMCOPY always returns NULL.
Example:
Source.ABC = 'ABCDEFG'
Source.123 = '123456789'
Call RxStemCopy 'Source.','Target.'
Say Target.ABC
Say Target.123
Output:
ABCDEFG
123456789
ΓòÉΓòÉΓòÉ 5.3.8. RxVarDump ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 5.3.9. RxWrite ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXWRITE(ΓöÇΓöÇ'stemname.'ΓöÇ,ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇfilenameΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
ΓööΓöÇdrive:ΓöÇΓöÿ ΓööΓöÇ\ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γöÿ
ΓööΓöÇpath\ΓöÇΓöÿ
Writes filename from the stem variable stemname.. The trailing period to
stemname. is required; results are unpredictable if it is not supplied.
RXWRITE requires that the number of lines to write are designated in
stemname.0. It also requires that the lines of text are placed in stemname.
such that entries are numeric in nature, starting at 1 and continuing up to the
number defined in stemname..0. stemname. variables that are not numeric or are
not within the range 1 to stemname.0 will not be written to filename. RXWRITE
writes the text lines in ascending numerical order.
RXWRITE always overlays the contents of a previously-existing file, otherwise
it creates the file as required.
RXWRITE always returns NULL if successful. If filename cannot be written, it
raises an 'Incorrect call to routine' condition.
Example:
MyStem.0 = 4
MyStem.4 = 'We''re as happy as can be.'
MyStem.2 = 'Hi There!'
MyStem.3 = 'Ho There!'
MyStem.1 = 'Hey There!'
Call RxWrite 'MyStem.','C:\Temp.Out'
Contents of C:\Temp.Out:
Hey There!
Hi There!
Ho There!
We're as happy as can be.
ΓòÉΓòÉΓòÉ 5.3.10. RxQueueList ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 5.3.11. RxQueueWriteStem ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 5.4. OS/2 Environment ΓòÉΓòÉΓòÉ
These APIs deal with accessing information about or changing characterstics of
your OS/2 machine.
ΓòÉΓòÉΓòÉ 5.4.1. RxChangeThreadPriority ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXCHANGETHREADPRIORITY(ΓöÇΓöÇthreadidΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ)ΓöÇΓöÇΓöÇ
Γö£ΓöÇ,deltaΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇ,'MINIMUM'ΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇ,'MAXIMUM'ΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇ,''ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇ,ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Changes the priority of threadid by the delta value specified. If the value is
left out, NULL or invalid, it is assumed to be the maximum.
Note: For OS/2 REXX running in an OS/2 Window, use thread id 0 to set the
priority of your program.
RXCHANGETHREADPRIORITY returns :-
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéReturn value ΓöéReason Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Priority changed" ΓöéPriority was successfully changed Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Invalid delta" ΓöéThe second parameter was not in the Γöé
Γöé Γöérange -31 to +31, blank, "maximum" or Γöé
Γöé Γöé"minimum" Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Invalid Thread id" ΓöéThe first parameter did not specify a Γöé
Γöé Γöévalid thread id. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Unknown return code n" ΓöéDosSetPriority returned an undocumented Γöé
Γöé Γöéreturn code of n Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Example:
rc = RxChangeThreadPriority(threadId, 5)
Results:
rc should contain the value "Priority changed"
ΓòÉΓòÉΓòÉ 5.4.2. RxGetEXEName ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXGETEXENAME(ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Returns the name of the executable currently running your REXX Code.
Example:
Say "The current running program is "RxGetEXEName()
Results:
The currnet running program is CMD.EXE /* possibly */
ΓòÉΓòÉΓòÉ 5.4.3. RxKillThread ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXKILLTHREAD(ΓöÇΓöÇthreadidΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Kills thread threadid.
RXKILLTHREAD returns :-
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéReturn value ΓöéReason Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Killed" ΓöéThread was successfully killed Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Thread busy" ΓöéThe thread to be killed was executing 16Γöé
Γöé Γöébit code, or was created by 16 bit code.Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Invalid Thread id" ΓöéThe first parameter did not specify a Γöé
Γöé Γöévalid thread id. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Unknown return code n" ΓöéDosKillThread returned an undocumented Γöé
Γöé Γöéreturn code of n Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Example:
If RxKillThread(5) = "Killed" Then
Say "Printing ceased"
Results:
Thread number 5 is stopped permanently and
rc should have the value "Killed"
Note: RxKillThread returns to the caller without waiting for the ending thread
to complete its termination processing.
Note: You cannot use this function to end the current thread. If you use
RxKillThread to end thread 1, the entire process ends.
ΓòÉΓòÉΓòÉ 5.4.4. RxQuerySwitchList ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXQUERYSWITCHLIST(ΓöÇΓöÇ'stemname.'ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Retrieves a list of executing sessions into the stemmed variable stemname..
The count of executing sessions, plus 1, is placed in stemname.0, and the title
of each session is placed in stemname.2 through stemname.n, where n is the
value found in stemname.0. stemname.1 will contain 'Switch to'. Note that
RXQUERYSWITCHLIST will list "hidden" sessions.
RXQUERYSWITCHLIST always returns NULL.
stemname.n.HWND holds the nth entry's window handle.
stemname.n.PID holds the nth entry's process id.
Example:
Call RxQuerySwitchList 'temp.'
Do Count = 2 to temp.0
Say temp.Count
End
Output:
4OS2 Window /* perhaps */
Tritus SPF /* perhaps */
System Clock /* perhaps */
Pulse /* perhaps */
Desktop /* perhaps */
ΓòÉΓòÉΓòÉ 5.4.5. RxResumeThread ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXRESUMETHREAD(ΓöÇΓöÇthreadidΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Allows thread threadid to resume execution after being suspended with
RXSUSPENDTHREAD.
RXRESUMETHREAD returns :-
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéReturn value ΓöéReason Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Resumed" ΓöéThread was successfully resumed Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Thread not previously ΓöéThe thread to be resumed had not been Γöé
Γöésuspended" Γöépreviously suspended Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Invalid Thread id" ΓöéThe first parameter did not specify a Γöé
Γöé Γöévalid thread id. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Unknown return code n" ΓöéDosResumeThread returned an undocumentedΓöé
Γöé Γöéreturn code of n Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Example:
If RxResumeThread(5) = 'Resumed' Then
Say 'Suspended Printing Continues...'
Results:
Thread number 6 continues processing /* hopefully */
ΓòÉΓòÉΓòÉ 5.4.6. RxSetThreadClass ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXSETTHREADCLASS(ΓöÇΓöÇthreadid ΓöÇΓöÇ,ΓöÇΓö¼ΓöÇ'REGULAR'ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Γö£ΓöÇ'IDLE'ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇ'TIMECRITICAL'ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
ΓööΓöÇ'FOREGROUNDSERVER'ΓöÇΓöÿ
Sets the class type of thread threadid to one of REGULAR, IDLE, TIMECRITICAL,
or FOREGROUNDSERVER. Only the R, I, T or F of the class type is required.
Note: For OS/2 REXX running in an OS/2 Window, use thread id 0 to set the
priority class of your program.
RXSETTHREADCLASS returns :-
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéReturn value ΓöéReason Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Class set" ΓöéThe class of the thread was successfullyΓöé
Γöé Γöéset Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Invalid class" ΓöéThe class pthread to be killed was Γöé
Γöé Γöéexecuting 16 bit code, or was created byΓöé
Γöé Γöé16 bit code. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Invalid Thread id" ΓöéThe first parameter did not specify a Γöé
Γöé Γöévalid thread id. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Unknown return code n" ΓöéDosKillThread returned an undocumented Γöé
Γöé Γöéreturn code of n Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Example:
If RxSetThreadClass(id, 'F') = 'Class set' Then
Say 'Printing sped up to foreground priority'
Results:
The thread should perform better than previously
ΓòÉΓòÉΓòÉ 5.4.7. RxSuspendThread ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXSUSPENDTHREAD(ΓöÇΓöÇthreadidΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Causes thread threadid to halt execution until it is killed with RXKILLTHREAD,
restarted with RXRESUMETHREAD, or the parent session is closed.
RXSUSPENDTHREAD returns :-
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéReturn value ΓöéReason Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Suspended" ΓöéThe class of the thread was successfullyΓöé
Γöé Γöéset Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Invalid Thread id" ΓöéThe first parameter did not specify a Γöé
Γöé Γöévalid thread id. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Unknown return code n" ΓöéDosSuspendThread returned an Γöé
Γöé Γöéundocumented return code of n Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Example:
Call RxSuspendThread id
If (result = 'Suspended') Then
Say 'Thread 'id' is temporarily suspended'
Results:
The thread number contained in the variable id is suspended.
ΓòÉΓòÉΓòÉ 5.4.8. RxSwitchTo ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXSWITCHTO(ΓöÇΓöÇ'session'ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Switches the forground session to the the session named by session.
RXSWITCHTO will attempt to locate a session, by name, that matches in any part
of its name to the contiguous characters defined by session For example, if
session contains 'stem C', RXSWITCHTO will switch to the System Clock session,
if it is active. If you desire to specifiy a complete name, use
RXQUERYSWITCHLIST to obtain the full names of all executing sessions.
RXSWITCHTO returns 'Switch Entry not found' if it cannot find a session name to
match session.
Example:
Call RxSwitchTo '2.0' /* try "OS/2 2.0 Desktop" */
If Result \= '' Then /* probably 2.1 */
Call RxSwitchTo 'Desktop'
Results:
The system switches to your OS/2 desktop, making it the active
forground session. Your REXX program continues to execute in
the background.
ΓòÉΓòÉΓòÉ 5.4.9. RxThread ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöé.......Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXTHREAD(ΓöÇΓöÇ'ProcName'ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
ΓöéΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉΓöé
Γöé ΓöéΓöé
ΓööΓö┤, argΓöÇΓöÇΓöÇΓöÇΓö┤Γöÿ
Causes the SubProc called ProcName to start execution in its own separate
thread.
As many arguments as REXX allows (up to 16 currently) can be passed to the
SubProc by specifying them after the SubProc name.
The new thread runs asynchronously until it is suspended (RXSUSPENDTHREAD), is
killed (RXKILLTHREAD), terminates of its own accord, or the parent session is
closed.
RXTHREAD returns the thread id if successful, otherwise it returns :-
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéReturn value ΓöéReason Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Out of memory" ΓöéThere was not enough memory to start theΓöé
Γöé Γöéthread Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Interrupt" ΓöéThe system was interrupted during threadΓöé
Γöé Γöécreation and the thread was aborted Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Protection violation" ΓöéThe system encountered a protection Γöé
Γöé Γöéviolation (accessing inaccesible memory Γöé
Γöé Γöéusually) while starting the thread. The Γöé
Γöé Γöéthread is aborted Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Too many threads" ΓöéThe system could not create any more Γöé
Γöé Γöéthreads. Check your THREADS= line in theΓöé
Γöé ΓöéCONFIG.SYS. It may be too low. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Unknown return code n" ΓöéDosCreateThread returned an undocumentedΓöé
Γöé Γöéreturn code n Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Note: The value returned is the threadid required for use with other RxExtras
thread functions.
Note: SubProcs started using RxThread CANNOT call other SubProcs or use global
variables defined in VisPro/REXX.
Note: Global Variables such as those created by RxSetGlobal can be used.
Note: The author is working on removing these restrictions.
Example:
tid = RxThread('SEARCH', window, listboxid, text)
Results:
tid will hold the thread id that was returned when the
SubProc SEARCH was executed in parallel.
ΓòÉΓòÉΓòÉ 5.4.10. RxNap ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXNAP(ΓöÇΓöÇtimeΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Puts a REXX program to sleep for a certain amount of time.
The SysSleep function that comes with OS/2 will only put your program to sleep
for whole seconds.
If the time specified (in milliseconds) is invalid, or is not passed to the
function, an INCORRECT CALL TO ROUTINE condition is raised from within REXX.
Example:
Call RxNap 50 /* sleep for 1/20 of a second */
Results:
The REXX program will stop execution for 1/20 of a second
ΓòÉΓòÉΓòÉ 5.4.11. RxKillProcess ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXKILLPROCESS(ΓöÇΓöÇprocidΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Kills process procid.
RXKILLPROCESS returns :-
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéReturn value ΓöéReason Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Killed" ΓöéProcess was successfully killed Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Invalid data" ΓöéAn internal error occurred - contact theΓöé
Γöé ΓöéRxExtras author. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Invalid process id" ΓöéThe parameter did not specify a valid Γöé
Γöé Γöéprocess id. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Zombie process" ΓöéOS/2 considers the process unkillable. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Not a descendant ΓöéWhen killing a tree of processes (not Γöé
Γöéprocess" Γöéyet implemented), the process specified Γöé
Γöé Γöéwas not a descendant of the calling Γöé
Γöé Γöéprocess. Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Example:
If RxKillProcess(5) = "Killed" Then
Say "Printing ceased"
Results:
Process number 5 is stopped permanently and
rc should have the value "Killed"
Note: See also RxKillThread.
ΓòÉΓòÉΓòÉ 5.4.12. RxMatchWildCard ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXMATCHWILDCARD(ΓöÇΓöÇsourceΓöÇΓöÇ, ΓöÇΓöÇwildCardΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
RxMatchWildCard is used to search for and edit names of files and
subdirectories. Typically, it is used in conjunction with functions which do
not permit the use of global file-name characters, to perform repetitive
operations on files.
An example of an editing operation is:-
source = "foo.bar"
wildCard = "*.baz"
Call RxMatchWildCard source, wildCard
/* result = "FOO.BAZ" */
In the editing process, the string is changed to uppercase.
Global file-name characters (?, *, .) have two uses:- searching and editing.
If they are specified in source, they are interpreted as search characters; in
wildCard, they are interpreted as editing characters. This difference can be
illustrated with an example using the COPY utility. The user types the
following:-
copy *.old *.new
In the source, "*" acts as a search character and determines which files to
return to the user. In the target, "*" functions as an editing character by
constructing new names for the matched files.
When used as search characters in source, global file-name characters simply
match files and behave like any other search characters. They have the
following meanings:-
. The period (.) has no special meaning itself, but "?"
gives it one.
* The asterisk will form a match with any character,
including a blank, or with the absence of a character.
The matching operation does not cross the null
character or the backslash (\), which means that only
the file name is matched, not an entire path.
? The question mark matches 1 character, unless what
it would match is a "." or the terminating null
characters, in which case it matches 0 characters. It
also does not cross "\".
Any character other than * and ? matches itself, including ".".
Searching is not case-sensitive.
If a file name does not have a period (.), an implicit one is automatically
appended to the end during searching operations. For example, searching for
"foo." would return "foo".
When used in wildCard, global file-name characters have the following
meanings:-
. The period (.) in the target synchronizes pointers. It
causes the source pointer to match a corresponding
pointer to the period in the target. Counting starts
from the left of the pointers.
? The question mark copies one character, unless what
it would copy is a period (.), in which case it copies
no characters. It also copies no characters when the
end of the source string is reached.
* The asterisk copies characters from the source to the
target until it finds a source character that matches
the character following it in the target.
Editing is case-insensitive and case-preserving. If conflicts arise between
the case of the source and that of the editing string, the case of the editing
string is used, for example:-
source string: "file.txt"
editing string: "*E.TMP"
result string: "filE.TMP"
copy file.txt *E.tmp -> filE.tmp
RXMATCHWILDCARD returns :-
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéReturn value ΓöéReason Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöétext ΓöéThe result of editing the source and Γöé
Γöé Γöéwildcard Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Invalid parameter" ΓöéAn internal error occurred - contact theΓöé
Γöé ΓöéRxExtras author. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Invalid name" ΓöéEither the source or wildCard parameter Γöé
Γöé Γöédid not specify a valid string for Γöé
Γöé Γöéediting. Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé"Unknown retured code x ΓöéAn unknown return code was encountered. Γöé
Γöé ΓöéContact the author of RxExtras with the Γöé
Γöé Γöéreturn code info. Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Example:
value = RxMatchWildCard('CONFIG.SYS', '*.BAK')
Say "Creating a backup of your CONFIG.SYS in "value
Results:
Creating a backup of your CONFIG.SYS in CONFIG.BAK
ΓòÉΓòÉΓòÉ <hidden> RxChangeThreadPriority (threadID, delta) ΓòÉΓòÉΓòÉ
Changes the priority of the thread id specified by the delta amount specified.
The delta value must be in the range -31 to +31.
ΓòÉΓòÉΓòÉ <hidden> RxChangeThreadPriority (threadID, 'Minimum') ΓòÉΓòÉΓòÉ
Lowers the priority of the thread id specified by the most possible (-31).
Only the first two characters of the second parameter are significant.
ΓòÉΓòÉΓòÉ <hidden> RxChangeThreadPriority (threadID, 'Maximum') ΓòÉΓòÉΓòÉ
Raises the priority of the thread id specified by the most possible (+31).
Only the first two characters of the second parameter are significant.
ΓòÉΓòÉΓòÉ <hidden> RxChangeThreadPriority (threadID, '') ΓòÉΓòÉΓòÉ
Raises the priority of the thread id specified by the most possible (+31).
ΓòÉΓòÉΓòÉ <hidden> RxSetThreadClass (threadID, 'REGULAR') ΓòÉΓòÉΓòÉ
Sets the class of the specified thread id to REGULAR. This is the class of
applications running in the background. The application with focus runs at
FOREGROUNDSERVER
ΓòÉΓòÉΓòÉ <hidden> RxSetThreadClass (threadID, 'IDLE') ΓòÉΓòÉΓòÉ
Sets the class of the specified thread id to IDLE. This is one step less
important than a normal application.
ΓòÉΓòÉΓòÉ <hidden> RxSetThreadClass (threadID, 'FOREGROUNDSERVER') ΓòÉΓòÉΓòÉ
Sets the class of the specified thread id to FOREGROUNDSERVER. This is the
class of the applications that currently has focus, or a server thread needing
higher than normal CPU.
ΓòÉΓòÉΓòÉ <hidden> RxSetThreadClass (threadID, 'TIMECRITICAL') ΓòÉΓòÉΓòÉ
Sets the class of the specified thread id to TIMECRITICAL. This should be used
very sparingly as it can make the foreground applcation unresponsive, since a
TIMECRITICAL thread gets more of the CPU than any FOREGROUNDSERVER thread.
ΓòÉΓòÉΓòÉ 5.5. ListBox Objects ΓòÉΓòÉΓòÉ
These APIs deal with PM ListBox Objects. They require a PM REXX-based program
in order to function.
ΓòÉΓòÉΓòÉ 5.5.1. RxAddItemAtIndex ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXADDITEMATINDEX(ΓöÇΓöÇwinidΓöÇΓöÇ,ΓöÇΓöÇ[lbid]ΓöÇΓöÇ,ΓöÇΓöÇrowΓöÇΓöÇ,ΓöÇΓöÇvalueΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Inserts the entry value at line row into ListBox lbid of Window winid.
If either winid or lbid are invalid, the rexx error condition INCORRECT CALL TO
ROUTINE is raised.
RXADDITEMATINDEX returns the index that the item was inserted at if successful,
otherwise it returns :-
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéReturn ΓöéReason Γöé
Γöévalue Γöé Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé-1 ΓöéThere was not enough memory to insert Γöé
Γöé Γöéthe item into the list box Γöé
Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γöé-2 ΓöéAn error occurred inserting the item Γöé
Γöé Γöéinto the listbox Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Example:
Call RxAddtItemAtIndex window, 1000, 4, 'This is the fourth line'
Results:
The ListBox with ID=1000 in window window receives a new row 4,
the contents of which are 'This is the fourth line'. Rows 5 and
higher are shifted down 1 row.
The REXX special variable result contains 4.
ΓòÉΓòÉΓòÉ 5.5.2. RxGetItemFromListBox ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXGETITEMFROMLISTBOX(ΓöÇΓöÇwinidΓöÇΓöÇ,ΓöÇΓöÇlbidΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Retrieves the first selected item from ListBox lbid of Window winid.
If either winid or lbid are invalid, the REXX error condition INCORRECT CALL TO
ROUTINE is raised.
If no items are selected, RXGETITEMFROMLISTBOX returns an empty string ("").
If winid and/or lbid are invalid, RXGETITEMFROMLISTBOX raises an INCORRECT CALL
TO ROUTINE error from within REXX. Otherwise, RXGETITEMFROMLISTBOX returns the
selected item.
Note: The VisPro/Rexx API VpGetItemValue will only return up to 256 characters
for the retrieved item. RxGetItemFromListBox will exactly what is in the
listbox.
Example:
row = RxGetItemFromListBox(window, 1000)
Results:
The first selected item in ListBox 1000 of window window is
retrieved and placed in the variable row.
ΓòÉΓòÉΓòÉ 5.5.3. RxGetItemFromListBoxAtIndex ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXGETITEMFROMLISTBOXATINDEX(ΓöÇΓöÇwindowΓöÇΓöÇ,ΓöÇΓöÇlbidΓöÇΓöÇ,ΓöÇΓöÇrowΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Retrieves the line row from ListBox lbid of Window window.
If no item exists at line row in window and/or lbid are invalid,
RXGETITEMFROMLISTBOXATINDEX raises an INCORRECT CALL TO ROUTINE error from
within REXX.
Otherwise, RXGETITEMFROMLISTBOXATINDEX returns the item of choice.
Note: The VisPro/Rexx API VpGetItemValueAtIndex will only return up to 256
characters for the retrieved item. RxGetItemFromListBoxAtIndex will return
whatever is in the listbox, with no limitations.
Example:
row = RxGetItemFromListBoxAtIndex(window, 1000, 4)
Results:
If it exists, the item at line 4 in ListBox 1000 of window window
is retrieved and placed in the variable row.
ΓòÉΓòÉΓòÉ 5.5.4. RxGetListBoxCount ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXGETLISTBOXCOUNT(ΓöÇΓöÇwinidΓöÇΓöÇ,ΓöÇΓöÇlbidΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Retrieves the number of rows available in ListBox lbid of Window winid.
If winid and/or lbid are invalid, RXGETLISTBOXCOUNT raises the INCORRECT CALL
TO ROUTINE error condition from within REXX. Otherwise, RXGETLISTBOXCOUNT
returns the number of available rows.
Example:
items = RxGetListBoxCount(window, 1000)
Results:
The number of rows in ListBox 1000 of window window are placed
in the variable items.
ΓòÉΓòÉΓòÉ 5.5.5. RxListBoxFromFile ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXLISTBOXFROMFILE(ΓöÇΓöÇwinidΓöÇΓöÇ,ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ,ΓöÇΓöÇfilenameΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
ΓööΓöÇlbidΓöÇΓöÿ
Places the contents of file filename into ListBox lbid of Window winid.
If lbid is omitted, winid is assumed to be the handle of a list box.
If winid and/or filename are invalid/inaccessible, RXLISTBOXFROMFILE raises an
INCORRECT CALL TO ROUTINE condition from within REXX. Otherwise,
RXLISTBOXFROMFILE returns a null string.
Note: For VisPro/Rexx, winid is passed to all events.
Note: This API appends to the end of any existing contents already in ListBox
lbid.
VisPro/REXX Example:
Call RxListBoxFromFile window, 1000, 'C:\Config.Sys'
VX-REXX Example:
window = VRGet("LB_1", "HWnd")
Call RxListBoxFromFile window,, 'C:\Config.Sys'
Results:
The contents of C:\Config.Sys are placed into ListBox 1000 of
window window (or listbox "LB_1" for VX-REXX).
ΓòÉΓòÉΓòÉ 5.5.6. RxListBoxFromStem ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXLISTBOXFROMSTEM(ΓöÇΓöÇwinidΓöÇΓöÇ,ΓöÇΓöÇlbidΓöÇΓöÇ,ΓöÇΓöÇstemname.ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Places the contents of stem stemname into ListBox lbid of Window winid. The
trailing period to stemname. is required; results are unpredictable if not
supplied.
stemname.0 must contain the count of items to be placed into ListBox lbid. All
other occurrences for stemname must be numeric, from 1 to n, where n is the
number contained in stemname.0.
If winid and/or lbid are invalid, RXLISTBOXFROMSTEM raises an INCORRECT CALL TO
ROUTINE from within REXX. Otherwise, RXLISTBOXFROMSTEM returns an empty string
("").
Note: This API appends to the end of any existing contents already in ListBox
lbid.
Example:
MyStem.0 = 2
MyStem.1 = 'This will be the 1st line added'
MyStem.2 = 'This will be the 2nd line added'
Call RxListBoxFromStem window, 1000, 'MyStem.'
Results:
The contents of ListBox 1000 of window window will have 2 new
rows. The rows will be:
This will be the 1st line added
This will be the 2nd line added
ΓòÉΓòÉΓòÉ 5.5.7. RxListBoxItemHandle ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXLISTBOXITEMHANDLE(ΓöÇΓöÇwindowΓöÇΓöÇ,ΓöÇ[ΓöÇΓöÇlistboxidΓöÇΓöÇ]ΓöÇ,ΓöÇΓöÇindexΓöÇΓöÇ[,ΓöÇΓöÇvalueΓöÇΓöÇ])ΓöÇΓöÇΓöÇ
This call either sets or queries some text associated with a ListBox item. It
does not change the text of the item or affect it in any other way.
If winid and/or index are invalid, RXLISTBOXFROMSTEM raises an INCORRECT CALL
TO ROUTINE from within REXX.
If the value parameter is omittted, RXLISTBOXITEMHANDLE returns the text
associated with that list box item (it's handle).
If the value parameter is specified, RXLISTBOXITEMHANDLE sets the text
associated with that list box item to the value.
If the listboxid parameter is omitted, window is assumed to be the window
handle of a listbox.
VisPro/REXX Example:
Call RxListBoxItemHandle window, 1000, 1, 'Line 1 must not be deleted'
VX-REXX Example:
window = VRGet("LB_1", "HWnd")
Call RxListBoxItemHandle window,, 1, 'Line 1 must not be deleted'
Results:
The first item (index 1) with have the text
'Line 1 must not be deleted' associated with it.
This text can be queried using RxListBoxItemHandle
by omitting the value parameter.
ΓòÉΓòÉΓòÉ 5.5.8. RxListBoxToFile ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXLISTBOXTOFILE(ΓöÇΓöÇwinidΓöÇΓöÇ,ΓöÇ[ΓöÇΓöÇlbidΓöÇΓöÇ]ΓöÇ,ΓöÇΓöÇfilenameΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Places the contents ListBox lbid of Window winid into file filename.
If winid and/or filename are invalid/inaccessible, RXLISTBOXTOFILE raises the
REXX INCORRECT CALL TO ROUTINE error condition. Otherwise, RXLISTBOXTOFILE
returns an empty string ("").
If lbid is omitted, winid is assumed to be the window handle of a listbox.
Note: This API erases all contents of file filename before writing to it.
VisPro/REXX Example:
Call RxListBoxToFile window, 1000, 'C:\MyData.Dat'
VX-REXX Example:
window = VRGet("LB_1", "HWnd")
Call RxListBoxToFile window,, 'C:\MyData.Dat'
Results:
The contents of ListBox 1000 of window window
(or listbox "LB_1" for VX-REXX) are written to
file C:\MyData.Dat.
ΓòÉΓòÉΓòÉ 5.5.9. RxListBoxToStem ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXLISTBOXTOSTEM(ΓöÇΓöÇwinidΓöÇΓöÇ,ΓöÇΓöÇlbidΓöÇΓöÇ,ΓöÇΓöÇstemname.ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Places the contents of ListBox lbid of Window winid into stem stemname. The
trailing period to stemname. is required; results are unpredictable if not
supplied.
stemname.0 will contain the count of items to placed into it from ListBox lbid.
All other occurrences for stemname will be numeric, from 1 to n, where n is the
number contained in stemname.0.
If winid and/or lbid are invalid, RXLISTBOXTOSTEM raises the REXX error
condition INCORRECT CALL TO ROUTINE. Otherwise, RXLISTBOXTOSTEM returns an
empty string ("").
Note: This API destroyes any existing contents already in stem stemname.
Example:
Call RxListBoxToStem window, 1000, 'MyStem.'
Results:
The contents of ListBox 1000 of window window will be copied
to stem MyStem. Assuming there are 2 rows in ListBox 1000,
MyStem.0 will contain 2, and occurrences will exist for MyStem.1
and MyStem.2.
ΓòÉΓòÉΓòÉ 5.5.10. RxScrollListBox ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXSCROLLISTBOX(ΓöÇΓöÇwinidΓöÇΓöÇ,ΓöÇ[ΓöÇΓöÇlbidΓöÇΓöÇ]ΓöÇ,ΓöÇΓöÇnumLinesToScroll.ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Scrolls the ListBox lbid of Window winid by numLinesToScroll lines. A negative
value should be used to scroll up, a positive value to scroll the listbox down.
If winid and/or lbid are invalid, RXSCROLLLISTBOX raises the REXX error
condition INCORRECT CALL TO ROUTINE.
If lbid is omitted, winid is assumed to be the window handle of a listbox.
if numLinesToScroll is not numeric, the listbox is simply not scrolled.
Otherwise, RXSCROLLLISTBOX returns an empty string ("").
VisPro/REXX Example:
Call RxScrollListBox window, 1000, -3
VX-REXX Example:
window = VRGet("LB_1", "HWnd")
Call RxScrollListBox window,, -3
Results:
The contents of ListBox 1000 (or the listbox called
"LB_1" for VX-REXX) of window window
will be scrolled up 3 lines
ΓòÉΓòÉΓòÉ 5.5.11. RxSearchItem ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Searches a listbox for text. Doesn't have to be an entire line, it can be text
contained within one line of a listbox.
RxSearchItem returns the line in the listbox that holds the text.
ΓöÇΓöÇΓöÇRXSEARCHITEM(ΓöÇΓöÇwinidΓöÇΓöÇ,ΓöÇΓöÇlbidΓöÇΓöÇ,ΓöÇΓö¼ΓöÇ''ΓöÇΓöÇΓöÇΓö¼ΓöÇ,ΓöÇΓöÇrowΓöÇΓöÇ,ΓöÇΓö¼ΓöÇ'F'ΓöÇΓö¼ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
ΓööΓöÇmaskΓöÇΓöÿ ΓööΓöÇ'B'ΓöÇΓöÿ
Searches ListBox lbid of Window winid, starting at line row, for a line
containing the characters mask. The search will procede forward or backward,
depending on the use of 'F' or 'B', respectively.
If winid and/or lbid are invalid, RXSEARCHITEM raises the REXX error condition
INCORRECT CALL TO ROUTINE. Otherwise, RXSEARCHITEM returns the index number of
the first matching line, or 0 if no lines were found to match mask. 0 is used
to indicate no match.
Note: If NULL (i.e., '') is used for mask, the first item tested will match.
RXSEARCHITEM can therefore be used to retrieve the index of the last item in
ListBox lbid.
Example:
JohnIsAt = RxSearchItem(window, 1000, 'John Smith', 1, 'F')
Results:
The contents of ListBox 1000 of window window will be searched,
starting at row 1 and proceding in a forward direction, looking
for any row that contains the characters 'John Smith'. If found,
variable JohnIsAt will contain the index (row number) of the
matching entry. Otherwise, JohnIsAt will contain 0.
ΓòÉΓòÉΓòÉ 5.6. PushButton Objects ΓòÉΓòÉΓòÉ
These APIs deal with PM PushButton Objects. They require a PM REXX-based
program in order to function.
ΓòÉΓòÉΓòÉ 5.6.1. RxMorphButtonToIcon ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXMORPHBUTTONTOICON(ΓöÇΓöÇwinidΓöÇΓöÇ,ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ,ΓöÇΓöÇΓö¼ΓöÇVpLoadPictureHandleΓöÇΓöÇΓö¼ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
ΓööΓöÇpbidΓöÇΓöÿ ΓööΓöÇDLLnameΓöÇΓöÇ,ΓöÇΓöÇresourceΓöÇΓöÿ
Converts a standard PushButton object pbid of window winid into a "Toolbox"
button.
If any arguments are invalid or inaccessible, RXMORPHBUTTONTOICON raises the
REXX error condition INCORRECT CALL TO ROUTINE. Otherwise, RXMORPHBUTTONTOICON
returns an empty string ("").
If pbid is ommitted, winid is assumed to be the window handle of a pushbutton.
Note: The use of VpLoadPictureHandle requires VisPro/Rexx. You must call
VpLoadPicture and obtain the handle.
Note: The use of DLLName, resource can be used by any PM REXX-based program,
and retrieves the requested icon. If DLLname is in your LIBPATH, do not
specify an extension of '.DLL'.
Note: In order to make the window appear to start-up with your required icons,
you should call RXMORPHBUTTONTOICON immediately at entry to your program, when
the window is being opened. Otherwise, the user will see the buttons change
appearance.
VisPro/REXX Example:
value = VpLoadPicture('FILE','C:\TEMP\OS2CMD.ICO')
Call RxMorphButtonToIcon window, 2000, value
Note: VX-REXX can only use the DLLname and resource form of this API.
VX-REXX Example:
window = VRGet("PB_1", "HWnd")
Call RxMorphButtonToIcon window,, 'PMWP', 13
Results:
The PushButton with ID=2000 in window 'window'
(or specified by window for VX-REXX) is changed to an
OS/2 Command-Prompt icon (stored previously in
C:\TEMP\OS2CMD.ICO, or as ICON number 13 in PMWP.DLL)
ΓòÉΓòÉΓòÉ 5.7. SpinButton Objects ΓòÉΓòÉΓòÉ
These APIs deal with PM SpinButton Objects. They require a PM REXX-based
program in order to function.
ΓòÉΓòÉΓòÉ 5.7.1. RxSetSpinButtonCharRange ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXSETSPINBUTTONCHARRANGE(ΓöÇΓöÇwinidΓöÇΓöÇ,ΓöÇΓöÇ[sbid]ΓöÇΓöÇ,ΓöÇΓöÇlowΓöÇΓöÇ,ΓöÇΓöÇhighΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Sets the SpinButton sbid of Window winid to include the ASCII character range
low through high. Only the first character of low and high are used.
If winid is invalid, RXSETSPINBUTTONCHARRANGE raises the REXX error condition
INCORRECT CALL TO ROUTINE.
If sbid is omitted, winid should be the PM window handle (HWnd) of a
spinbutton.
Otherwise, RXSETSPINBUTTONCHARRANGE returns an empty string ("").
VisPro/REXX Example:
Call RxSetSpinButtonCharRange Hwindow, 4000, 'a', 'z'
VX-REXX Example:
Call RxSetSpinButtonCharRange VRGet("SPIN_1", "Hwnd),, 'a', 'z'
Results:
The SpinButton (with ID=4000 for VisPro/REXX and called SPIN_1
in VX-REXX) now contains the selection character set
'a' through 'z', inclusive.
ΓòÉΓòÉΓòÉ 5.7.2. RxSetSpinButtonRangeFromStem ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXSETSPINBUTTONRANGEFROMSTEM(ΓöÇΓöÇwinidΓöÇΓöÇ,ΓöÇΓöÇ[sbid]ΓöÇΓöÇ,ΓöÇΓöÇstemname.ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Sets the SpinButton sbid of Window winid to include the values found in stem
stemname. The trailing period to stemname. is required; results are
unpredictable if not supplied.
stemname.0 must contain the number of values to assign to SpinButton sbid. All
other occurences of stemname should contain the values desired for sbid, and be
in the range 1 to n, where n is the value contained in stemname.0.
If winid is invalid, RXSETSPINBUTTONRANGEFROMSTEM raises the REXX error
condition INCORRECT CALL TO ROUTINE.
If sbid is omitted, winid should be the PM window handle (HWnd) of a
spinbutton.
Otherwise, RXSETSPINBUTTONRANGEFROMSTEM returns an empty string ("").
VisPro/REXX Example:
days.0 = 7; days.1 = 'Sun'; days.2 = 'Mon'; days.3 = 'Tue';
days.4 = 'Wed'; days.5 = 'Thu'; days.6 = 'Fri'; days.7 = 'Sat';
Call RxSetSpinButtonRangeFromStem Hwindow, 4000, 'days.'
VX-REXX Example:
days.0 = 7; days.1 = 'Sun'; days.2 = 'Mon'; days.3 = 'Tue';
days.4 = 'Wed'; days.5 = 'Thu'; days.6 = 'Fri'; days.7 = 'Sat';
Call RxSetSpinButtonRangeFromStem VRGet("SPIN_1", "HWnd"),, 'days.'
Results:
The SpinButton (with ID=4000 in VisPro/REXX and called SPIN_1
in VX-REXX) now contains the selection character set
'Sun', 'Mon', 'Tue', 'Wed' etc.
ΓòÉΓòÉΓòÉ 5.7.3. RxSetSpinButtonRangeWithIncrement ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXSETSPINBUTTONRANGEWITHINCREMENT(ΓöÇΓöÇwinidΓöÇΓöÇ,ΓöÇΓöÇ[sbid]ΓöÇΓöÇ,ΓöÇΓöÇlowΓöÇΓöÇ,ΓöÇΓöÇhighΓöÇΓöÇ,ΓöÇΓöÇΓöÇΓöÇΓöÇ
ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇincrementΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ)ΓöÇΓöÇ
Sets the SpinButton sbid of Window winid to the numeric range of low to high,
in incriments of incriment.
If winid is invalid, RXSETSPINBUTTONRANGEWITHINCRIMENT raises the REXX error
condition INCORRECT CALL TO ROUTINE.
If sbid is omitted, winid should be the PM window handle (HWnd) of a
spinbutton.
Otherwise, RXSETSPINBUTTONRANGEWITHINCRIMENT returns an empty string ("").
VisPro/REXX Example:
Call RxSetSpinButtonRangeWithIncrment window, 4000, 0, 10000, 2000
VX-REXX Example
Call RxSetSpinButtonRangeWithIncrement VRGet("SPIN_1", "HWnd"),,0,10000,2000
Results:
The SpinButton (with ID=4000 or called SPIN_1) now contains the
selection numeric set 0, 2000, 4000, 6000, 8000, and 10000.
Note: The maximum number of discrete values that this function can store in a
spin button is 4096.
ΓòÉΓòÉΓòÉ 5.8. Window Objects ΓòÉΓòÉΓòÉ
These APIs deal with OS/2 Windows and PM window types & hierarchies. They
require a window handle, therefore, a PM REXX-based program in order to
function.
ΓòÉΓòÉΓòÉ 5.8.1. RxMaximize ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXMAXIMIZE(ΓöÇΓöÇwinidΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Causes window winid to become maximized.
If winid is invalid, RXMAXIMIZE raises the REXX error condition INCORRECT CALL
TO ROUTINE.
If an error occurs, RXMAXIMIZE returns "Error occured trying to maximize",
otherwise, RXMAXIMIZE returns an empty string ("").
VisPro/REXX Example:
Call RxMaximize window
VX-REXX Example:
HWnd = VRGet("MyWindow", "HWnd")
Call RxMaximize HWnd
Results:
The window 'window' is maximized.
ΓòÉΓòÉΓòÉ 5.8.2. RxMinimize ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXMINIMIZE(ΓöÇΓöÇwinidΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Causes window winid to become minimized.
If winid is invalid, RXMINIMIZE raises the REXX error condition INCORRECT CALL
TO ROUTINE.
If RXMINIMIZE encounters an error, it returns "Error trying to minimize",
otherwise, RXMINIMIZE returns an empty string ("").
VisPro/REXX Example:
Call RxMinimize window
VX-REXX Example:
HWnd = VRGet("MyWindow", "HWnd")
Call RxMinimize HWnd
Results:
The window 'window' is minimized.
ΓòÉΓòÉΓòÉ 5.8.3. RxQueryClassName ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXQUERYCLASSNAME(ΓöÇΓöÇwinidΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Returns the Class Name for window winid.
If winid is invalid, RXQUERYCLASSNAME raises the REXX error condition INCORRECT
CALL TO ROUTINE.
If an error occurs, RXQUERYCLASSNAME returns "Error trying to query classs
name", otherwise, RXQUERYCLASSNAME returns the PM Class Name for the window.
VisPro/REXX Example:
WinClass = RxQueryClassName(window)
VX-REXX Example:
HWnd = VRGet("MyWindow", "HWnd")
WinClass = RxQueryClassName(HWnd)
Results:
The Class Name of window 'window' is placed in the variable WinClass.
ΓòÉΓòÉΓòÉ 5.8.4. RxQueryWindow ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXQUERYWINDOW(ΓöÇΓöÇwinidΓöÇΓöÇ,ΓöÇΓö¼ΓöÇ'Owner'ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ)ΓöÇΓöÇΓöÇ
Γö£ΓöÇ'Parent'ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇ'Next'ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇ'Prev'ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇ'Top'ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇ'Bottom'ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇ'NextTop'ΓöÇΓöÇΓöÇΓöÇΓöñ
Γö£ΓöÇ'PrevTop'ΓöÇΓöÇΓöÇΓöÇΓöñ
ΓööΓöÇ'FrameOwner'ΓöÇΓöÿ
Returns the window handle for the requested related window to winid.
Double-click on each window relation above for further information.
If winid is invalid, RXQUERYWINDOW raises the REXX error condition INCORRECT
CALL TO ROUTINE. Otherwise, RXQUERYWINDOW returns the requested PM window
handle, in decimal.
VisPro/REXX Example:
WinParent = RxQueryWindow(window, 'Parent')
VX-REXX Example:
HWnd = VRGet("MyWindow", "HWnd")
WinParent = RxQueryWindow(HWnd, 'Parent')
Results:
The parent window handle, in decimal, for window 'window'
is placed in the variable WinParent.
ΓòÉΓòÉΓòÉ 5.8.5. RxRestore ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXRESTORE(ΓöÇΓöÇwinidΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Restores window winid to its normal state after being maximized or minimized.
If winid is invalid, RXRESTORE raises the REXX error condition INCORRECT CALL
TO ROUTINE.
If an error occurs, RXRESTORE returns "Error trying to restore", otherwise,
RXRESTORE restores the requested PM window, and returns an empty string ("").
VisPro/REXX Example:
Call RxRestore window
VX-REXX Example:
HWnd = VRGet("MyWindow", "HWnd")
Call RxRestore HWnd
Results:
Restores the window 'window' from a minimised state.
ΓòÉΓòÉΓòÉ 5.8.6. RxSetIcon ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXSETICON(ΓöÇΓöÇwinidΓöÇΓöÇ,ΓöÇΓöÇΓö¼ΓöÇVpLoadPictureHandleΓöÇΓöÇΓö¼ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
ΓööΓöÇDLLnameΓöÇΓöÇ,ΓöÇΓöÇresourceΓöÇΓöÿ
Sets the icon for a window.
This icon is the one used when a window is minimized.
If winid is invalid, RXSETICON raises the REXX error condition INCORRECT CALL
TO ROUTINE.
If an error occurs loading the icon from a DLL, RXSETICON returns "Error
loading icon from DLL".
If an error occurs setting the icon, RXSETICON returns "Error setting icon".
Otherwise RXSETICON returns an empty string ("").
Note: There are many icons held within the Work Place Shell DLL's. An
ICONS.CMD file, which is part of the REXXUTIL information that IBM supplies on
CIS or BBS's, can show you most of these. If you would like this file, please
contact the author of RxExtras.
VisPro/REXX Example:
value = VpLoadPicture('FILE', 'C:\TEMP.ICO');
FrameWindow = RxQueryWindow(RxQueryWindow(window, 'parent'), 'parent')
Call RxSetIcon FrameWindow, value
Note: VX-REXX programs can only use the DLL and resource number form of this
API.
VX-REXX Example:
HWnd = VRGet("MyWindow", "HWnd")
FrameWindow = RxQueryWindow(HWnd, 'parent')
Call RxSetIcon FrameWindow, 'PMWP', 13
Results:
Loads an icon from C:\TEMP.ICO (or PMWP.DLL icon number 13).
Calculates the Frame Window (the one that the user interacts with)
from the window passed to a VisPro/REXX event (or VX-REXX object).
Sets the minimized icon for the window passed.
ΓòÉΓòÉΓòÉ 5.8.7. RxWindowSetFocus ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXWINDOWSETFOCUS(ΓöÇΓöÇwindowΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Switches focus to window window.
If window is an invalid string, RXWINDOWSETFOCUS raises the REXX error
condition INCORRECT CALL TO ROUTINE.
If an error occurs, RXWINDOWSETFOCUS returns "Error setting focus", otherwise,
RXWINDOWSETFOCUS sets the focus to the window requested and returns an empty
string ("").
You can use this call to bring a VisPro/REXX form to the foreground when
necessary. window can be the variable passed to as an argument to all
VisPro/REXX events, or it could be the value returned from a VpOpenForm call.
VisPro/REXX Example:
Call RxWindowSetFocus window
VX-REXX Example:
HWnd = VRGet("MyWindow", "HWnd")
Call RxWindowSetFocus HWnd
Results:
Switches focus to the window 'window'.
ΓòÉΓòÉΓòÉ 5.8.8. RxWindowSetOwner ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXWINDOWSETOWNER(ΓöÇΓöÇwindowΓöÇΓöÇ,ΓöÇΓöÇowningWindowΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Sets the owner of window to be owningWindow. This has the effect of making
window always 'stay on top' of owningWindow.
If window and/or owningWindow is an invalid string, RXWINDOWSETFOCUS raises the
REXX error condition INCORRECT CALL TO ROUTINE.
If an error occurs, RXWINDOWSETOWNER returns "Error setting owner", otherwise,
RXWINDOWSETOWNER sets the owner of the first window to the second window passed
and returns an empty string ("").
You can use this call to make a window stay on top of another window, even when
the other window is explicitly given focus by the user.
VisPro/REXX Example:
value = VpOpenForm(window, 257, 'topic of secondary form')
Call RxWindowSetFocus window, value
VX-REXX Example:
window = VRGet("MyWindow", "HWnd")
value = VRGet("MySecondWindow", "HWnd")
Call RxWindowSetOwner window, value
Results:
Makes the window whose handle is in the variable 'value', stay
on top of the window whose handle is in the variable 'window'.'
ΓòÉΓòÉΓòÉ 5.8.9. RxWindowQueryText ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXWINDOWQUERYTEXT(ΓöÇΓöÇwindowΓöÇΓöÇ[,ΓöÇΓöÇidΓöÇΓöÇ]ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Returns the text of the window identified by either the window alone, or by the
window and an id This will give you the text of an entry field or MLE, or
static text.
If window is an invalid string, RXWINDOWQUERYTEXT raises the REXX error
condition INCORRECT CALL TO ROUTINE.
This function was written specifically to correct bugs with MLE's in
VisPro/REXX V1.1.
VisPro/REXX Example:
value = RxWindowQueryText(window, 1001)
/* id 1001 is an MLE */
VX-REXX Example:
HWnd = VRGet("MLE_1", "HWnd")
value = RxWindowQueryText(HWnd)
Results:
Places the text of the window into the variable value.
ΓòÉΓòÉΓòÉ <hidden> RxQueryWindow (winid,'Owner') ΓòÉΓòÉΓòÉ
Requests the Owner window handle of winid. The Owner window is the one which
window winid is dependent upon. Quite frequently, this is the same as
'Parent'.
ΓòÉΓòÉΓòÉ <hidden> RxQueryWindow (winid,'Parent') ΓòÉΓòÉΓòÉ
Requests the Parent window handle of winid. The Parent window is the one that
causes window winid to be initialized.
ΓòÉΓòÉΓòÉ <hidden> RxQueryWindow (winid,'Next') ΓòÉΓòÉΓòÉ
Requests the Next window handle, in z-order, of winid. This is the next window
at the same "level" as window winid.
ΓòÉΓòÉΓòÉ <hidden> RxQueryWindow (winid,'Prev') ΓòÉΓòÉΓòÉ
Requests the Previous window handle, in z-order, of winid. This is the
previous window at the same "level" as window winid.
ΓòÉΓòÉΓòÉ <hidden> RxQueryWindow (winid,'Top') ΓòÉΓòÉΓòÉ
Requests the Topmost (first) "child" window handle of winid. This is the first
window that window winid caused to be initialized.
ΓòÉΓòÉΓòÉ <hidden> RxQueryWindow (winid,'Bottom') ΓòÉΓòÉΓòÉ
Requests the Bottommost (last) "child" window handle of winid. This is the
last window that window winid caused to be initialized.
ΓòÉΓòÉΓòÉ <hidden> RxQueryWindow (winid,'NextTop') ΓòÉΓòÉΓòÉ
Requests the next window, in z-order, of the owner window hierarchy for winid.
See 'Owner'.
ΓòÉΓòÉΓòÉ <hidden> RxQueryWindow (winid,'PrevTop') ΓòÉΓòÉΓòÉ
Requests the previous window, in enumeration order defined by NextTop, of the
owner window hierarchy for winid. See 'Owner'.
ΓòÉΓòÉΓòÉ <hidden> RxQueryWindow (winid,'FrameOwner') ΓòÉΓòÉΓòÉ
Requests the owner of winid, normalized so that it shares the same window as
its Parent.
ΓòÉΓòÉΓòÉ 5.9. Free Form window Objects ΓòÉΓòÉΓòÉ
These APIs deal with VisPro/REXX Free Form Window Objects. They require a PM
REXX-based program in order to function.
ΓòÉΓòÉΓòÉ 5.9.1. RxDrawBitmap ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXDRAWBITMAP(ΓöÇΓöÇwinidΓöÇΓöÇ,ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ,ΓöÇΓöÇΓö¼ΓöÇVpLoadPictureHandleΓöÇΓöÇΓö¼ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
ΓööΓöÇpbidΓöÇΓöÿ ΓööΓöÇDLLnameΓöÇΓöÇ,ΓöÇΓöÇresourceΓöÇΓöÿ
Draws a bitmap in a free form window of id ffid in window winid.
RXDRAWBITMAP will stretch the bitmap to take up the entire size of the free
form window.
If any arguments are invalid or inaccessible, RXDRAWBITMAP raises the REXX
error condition INCORRECT CALL TO ROUTINE.
If there is an error loading the bitmap from a DLL, RXDRAWBITMAP will return
"Error loading bitmap from DLL".
Otherwise, RXDRAWBITAMP returns an empty string ("").
If pbid is ommitted, winid is assumed to be a valid window handle.
Note: The use of VpLoadPictureHandle requires VisPro/Rexx. You must call
VpLoadPicture and obtain the handle.
Note: The use of DLLName, resource can be used by any PM REXX-based program,
and retrieves the requested bitmap. If DLLname is in your LIBPATH, do not
specify an extension of '.DLL'.
VisPro/REXX Example:
value = VpLoadPicture('FILE','C:\OS2\BITMAP\OS2LOGO.BMP')
Call RxDrawBitmap window, 2000, value
VX-REXX Example:
window = VRGet("MyWindow", "HWnd")
Call RxDrawBitmap window,, 'MYDLL', 3
Results:
The Free Form window with ID=2000 in the window 'window'
has the OS2LOGO bitmap drawn inside it. (For the VX-REXX
example, the bitmap with number 3 in MYDLL.DLL is drawn in window
'MyWindow'.)
Note: This API may work with other window types, it just has not been tested
with them.
ΓòÉΓòÉΓòÉ 5.10. Clipboard Objects ΓòÉΓòÉΓòÉ
These APIs deal with the OS/2 Presentation Manager clipboard. They require a
PM REXX-based program in order to function.
ΓòÉΓòÉΓòÉ 5.10.1. RxAppendClipboardText ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXAPPENDCLIPBOARDTEXT(ΓöÇΓöÇTextΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
This function appends the text passed to the current contents of the clipboard.
RXAPPENDCLIPBOARDTEXT returns the text previously in the clipboard if
successful.
If there is an error opening the clipboard, RXAPPENDCLIPBOARDTEXT returns
"Error opening the clipboard".
If there is no textual data in the clipboard, RXAPPENDCLIPBOARDTEXT sets the
clipboard to contain the text passed.
If there is an error setting the clipboard data, RXAPPENDCLIPBOARDTEXT returns
"Error setting clipboard data".
If there is not one valid string as the argument to RXAPPENDCLIPBOARDTEXT, the
REXX error condition INCORRECT CALL TO ROUTINE is raised.
Example:
PrevText = RxAppendClipboardText("Stuff to add")
Say 'The contents of the clipboard were "'PrevText'", and are now "'RxQueryClipboardText()'".'
Results:
The contents of the clipboard were "ABCD", and are now "ABCDStuff to add".
Note: To get multiple lines into the clipboard, you should use a carriage
return and linefeed combination at the end of the string. This can be achieved
by the following code sample :-
CrLfString = OldString || d2c(13) || d2c(10)
ΓòÉΓòÉΓòÉ 5.10.2. RxQueryClipboardText ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXQUERYCLIPBOARDTEXT()ΓöÇΓöÇΓöÇ
This function queries the current content of the clipboard.
RXQUERYCLIPBOARDTEXT returns the text currently in the clipboard if successful.
If there is an error opening the clipboard, RXQUERYCLIPBOARDTEXT returns "Error
opening the clipboard".
If there is no textual data in the clipboard, RXQUERYCLIPBOARD returns an empty
string ("").
Example:
Text = RxQueryClipboardText()
Say 'The contents of the clipboard are "'Text'".'
Results:
The contents of the clipboard are "This is in the clipboard".
ΓòÉΓòÉΓòÉ 5.10.3. RxSetClipboardText ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXSETCLIPBOARDTEXT(ΓöÇΓöÇTextΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
This function sets the current content of the clipboard.
RXSETCLIPBOARDTEXT returns "Clipboard set" if successful.
If there is an error opening the clipboard, RXSETCLIPBOARDTEXT returns "Error
opening the clipboard".
If there is an error putting the data into the clipboard, RXSETCLIPBOARDTEXT
returns "Error setting clipboard data".
If there is not one valid string as the argument to RXSETCLIPBOARDTEXT, the
REXX error condition INCORRECT CALL TO ROUTINE is raised.
Example:
Say RxSetClipboardText("New text for the clipboard")
Say 'The contents of the clipboard are now "'RxQueryClipboardText()'".'
Results:
Clipboard Set
The contents of the clipboard are now "New text for the clipboard".
ΓòÉΓòÉΓòÉ 5.11. Printing ΓòÉΓòÉΓòÉ
These APIs deal with accessing information to, from, or about printer queues.
ΓòÉΓòÉΓòÉ 5.11.1. RxQueueList ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXQUEUELIST(ΓöÇΓöÇstemΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Returns a list of print queues available for the workstation.
If stem is not a valid string, or is omitted, RXQUEUELIST raises an INVALID
CALL TO ROUTINE condition from within REXX.
RXQUEUELIST fills the stem passed with the Print Queues available. stem.0
contains the number of queues available. stem.1 contains the first queue found,
stem.2 contains the second queue, up to stem.n contain ing the nth queue, where
n = stem.0.
stem.n.DRIVERNAME holds the print driver associated with the nth queue. This
will be needed for other printer API calls, as the Queue Name may not be
unique.
stem.default returns the index of the default queue (from 1 to stem.0).
Example:
Call RxQueueList 'queues.'
Do i = 1 to queues.0
Say 'Queue 'i' is 'queues.i
End
def = queues.default
Say 'The default print queue is 'queues.def
Say 'The driver for this queue is 'queues.i.drivername
Output:
Queue 1 is Printer
Queue 2 is Apple LaserWriter Plus on COM2
Queue 3 is Epson LQ-580
The default print queue is Apple LaserWriter Plus on COM2
The driver for this queue is PSCRIPT.Apple LaserWriter
ΓòÉΓòÉΓòÉ 5.11.2. RxQueueSetDefault ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXQUEUESETDEFAULT(ΓöÇΓöÇqueueAndDriverNameΓöÇ)ΓöÇΓöÇΓöÇ
Sets the default print queue for a workstation.
The parameter passed is the queue name concatenated to the driver name with a
period. To produce this name from the stem returned by RxQueueList using the
following code :-
queueAndDriverName = queues.1 || '.' || queues.1.drivername
If queueAndDriverName does not exist, RXQUEUESETDEFAULT raises an 'Incorrect
call to routine' condition.
See also RxQueueList for the correct way of obtaining queue and driver names.
Example:
Call RxQueueSetDefault 'Apple LaserWriter Plus on COM2.PSCRIPT.Apple LaserWriter'
Output:
The default queue will be changed to the Apple Laser Writer queue.
ΓòÉΓòÉΓòÉ 5.11.3. RxQueueJobProperties ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXQUEUEJOBPROPERTIES(ΓöÇΓöÇqueueAndDriverNameΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Asks the queue specified to display a 'Job Properties' dialog for the user, so
that they can tailor options for an imminent print job.
The parameter passed is the queue name concatenated to the driver name with a
period. To produce this name from the stem returned by RxQueueList using the
following code :-
queueAndDriverName = queues.1 || '.' || queues.1.drivername
If queueAndDriverName does not exist, RXQUEUEJOBPROPERTIES raises an 'Incorrect
call to routine' condition.
See also RxQueueList for the correct way of obtaining queue names and driver
names.
This function requires a Presentation Manager program to work correctly.
Example:
Call RxQueueJobProperties 'Apple LaserWriter Plus on COM2.PSCRIPT.Apple LaserWriter'
Output:
A job properties dialogue is displayed.
ΓòÉΓòÉΓòÉ 5.11.4. RxQueueWriteStem ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé.........ΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXQUEUEWRITESTEM(ΓöÇΓöÇqueueAndDriverName, stemΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Writes the entries stem.1, stem.2, stem.3 to stem.n where n = stem.0, to the
Queue identified by queueAndDriverName.
The first parameter passed is the queue name concatenated to the driver name
with a period. To produce this name from the stem returned by RxQueueList using
the following code :-
queueAndDriverName = queues.1 || '.' || queues.1.drivername
If queueAndDriverName does not exist, or a stem is not specified,
RXQUEUEWRITESTEM raises an 'Incorrect call to routine' condition.
stem.jobname specifies the name that is to appear in the printer queue for this
print job.
stem.priority specifies the priority (1 to 99) that is to be given to this
print job.
stem.copies specifies the number of copies of this print image to be printed.
See also RxQueueList for the correct way of obtaining queue names and driver
names.
This function requires a Presentation Manager program to work correctly.
Example:
temp.0 = 3
temp.1 = 'A line of print'
temp.2 = 'may not be worth the paper it is printed on....'
temp.3 = ' Beware'
temp.priority = 50
temp.jobname = 'My Quote'
temp.copies = 1000
Call RxQueueWriteStem 'Apple LaserWriter Plus on COM2.PSCRIPT.Apple LaserWriter', 'temp.'
Output:
One THOUSAND COPIES of the 3 line quote are produced on an
Apple LaserWriter Plus printer.
All text longer than one line is wrapped, and if the text is
more than one page, multiple pages are written out.
ΓòÉΓòÉΓòÉ 5.12. Event synchronisation and Resource Serialisation ΓòÉΓòÉΓòÉ
These APIs deal with synchronising threads and processes using events and
serialising access to resources.
The APIs are implemented using OS/2's semaphore support.
An event corresponds to an Event Semaphore and a resource corresponds to a
Mutex Semaphore.
ΓòÉΓòÉΓòÉ 5.12.1. RxEventCreate ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXEVENTCREATE(ΓöÇΓöÇnameΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇ,statusΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Creates an event used for process or thread synchronisation.
If the name or status (if passed) are invalid strings, RXEVENTCREATE raises an
INCORRECT CALL TO ROUTINE from within REXX.
RXEVENTCREATE returns a handle which uniquely identifies the event if
successful, or "Error creating event" if unsuccessful.
The handle returned is for use with RxEventDestroy.
Example:
hEvent = RxEventCreate('FileLoad')
Output:
An event called 'FileLoad' is created and
a handle to it is returned in hEvent.
ΓòÉΓòÉΓòÉ 5.12.2. RxEventDestroy ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXEVENTDESTROY(ΓöÇΓöÇhandleΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Destroys the event used for process or thread synchronisation.
If the handle is not passed, RXEVENTDESTROY raises an INCORRECT CALL TO ROUTINE
from within REXX.
RXEVENTDESTROY returns "" if successful.
A valid handle is obtained when the event is created, using RxEventCreate.
Example:
Call RxEventDestroy hEvent
Output:
An event called 'FileLoad' which was previously
created, and whose hand is stored in hEvent is
destroyed and a NULL string is returned.
ΓòÉΓòÉΓòÉ 5.12.3. RxEventWaitFor ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXEVENTWAITFOR(ΓöÇΓöÇnameΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇ,timeoutΓöÇΓöÇΓöÇΓöÇΓöÿ
Waits for the event name used for process or thread synchronisation to occur.
The REXX program that calls this function is blocked until either the event
occurs, or the timeout period expires.
If the name is not passed, RXEVENTDESTROY raises an INCORRECT CALL TO ROUTINE
from within REXX.
RXEVENTWAITFOR returns "Event occurred" if successful, "Timeout waiting for
event", "Interrupted waiting for event", "Error waiting for event" if there is
an error during waiting, or "Error finding event" if the event name is
incorrect.
Example:
Call RxEventWaitFor 'FileLoad', 500
Say result
Output:
An event called 'FileLoad' which was previously
created is waited on for 1/2 a second.
The REXX special variable result holds the value returned
by the function call.
ΓòÉΓòÉΓòÉ 5.12.4. RxEventOccurred ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXEVENTOCCURRED(ΓöÇΓöÇnameΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Notifies any waiting programs that the event name has occurred. This tells all
waiting programs to continue execution. Programs wait for an event by calling
RxEventWaitFor.
If the name is not passed, RXEVENTOCCURRED raises an INCORRECT CALL TO ROUTINE
from within REXX.
RXEVENTOCCURRED returns "" if successful, "Error finding event" if the event
name is incorrect, or "Event already in 'occurred' state" if the event named
has already occurred without being reset by RxEventReset.
Example:
Call RxEventOccurred 'FileLoad'
Output:
An event called 'FileLoad' which was previously
created is marked as 'occurred' and a NULL string is returned.
All programs waiting on this event with RxEventWaitFor continue
execution.
ΓòÉΓòÉΓòÉ 5.12.5. RxEventQuery ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXEVENTQUERY(ΓöÇΓöÇnameΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Returns the number of times an event has occurred since being reset. Programs
reset an event by calling RxEventReset.
If the name is not passed, RXEVENTQUERY raises an INCORRECT CALL TO ROUTINE
from within REXX.
RXEVENTQUERY returns a number if successful, "Error finding event" if the event
name is incorrect, or "Error querying event" if some other error occurs.
Example:
numTimes = RxEventOccurred('FileLoad')
Say 'The file was loaded' numTimes' times.'
Output:
The file was loaded 5 times.
ΓòÉΓòÉΓòÉ 5.12.6. RxEventReset ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXEVENTRESET(ΓöÇΓöÇnameΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Resets an event so that it is in a 'Waiting' state and sets the count of event
occurrences back to zero.
If the name is not passed, RXEVENTRESET raises an INCORRECT CALL TO ROUTINE
from within REXX.
RXEVENTRESET returns "Event occurred n times since last reset" if successful (n
is a number), "Error finding event" if the event name is incorrect, or "Event
already in 'reset' state" if the event named has already been reset.
Example:
Say RxEventReset('FileLoad')
Output:
Event occurred 5 times since last reset
ΓòÉΓòÉΓòÉ 5.12.7. RxResourceCreate ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXRESOURCECREATE(ΓöÇΓöÇnameΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇ,statusΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Creates a resource used for process or thread serialisation.
If the name or status (if passed) are invalid strings, RXRESOURCECREATE raises
an INCORRECT CALL TO ROUTINE from within REXX.
RXRESOURCECREATE returns a handle which uniquely identifies the event if
successful, or "Error creating resource" if unsuccessful.
The handle returned is for use with RxResourceDestroy.
Example:
hRes = RxResourceCreate('FileWrite')
Output:
A resource called 'FileWrite' is created and
a handle to it is returned in hRes.
ΓòÉΓòÉΓòÉ 5.12.8. RxResourceDestroy ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXRESOURCEDESTROY(ΓöÇΓöÇhandleΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Destroys the resource used for process or thread serialisation.
If the handle is not passed, RXRESOURCEDESTROY raises an INCORRECT CALL TO
ROUTINE from within REXX.
RXRESOURCEDESTROY returns "" if successful.
A valid handle is obtained when the event is created, using RxResourceCreate.
Example:
Call RxResourceDestroy hResource
Output:
A resource called 'FileWrite' which was previously
created, and whose handle is stored in hResource is
destroyed and a NULL string is returned.
ΓòÉΓòÉΓòÉ 5.12.9. RxResourceRequest ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXRESOURCEREQUEST(ΓöÇΓöÇnameΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
ΓööΓöÇΓöÇ,timeoutΓöÇΓöÇΓöÇΓöÇΓöÿ
Waits for the resource name used for process or thread serialisation to become
available. The REXX program that calls this function is blocked until either
the resource becomes available, or the timeout period expires.
If the name is not passed, RXRESOURCEREQUEST raises an INCORRECT CALL TO
ROUTINE from within REXX.
RXRESOURCEREQUEST returns "Resource available" when the resource becomes
available, "Error finding event" if the event name is incorrect, or "Timeout
waiting for resource" if the timeout period expires, "Interrupted waiting for
resource" if OS/2 interrupts the request, or "Error waiting for resource" if
there is an error during the request.
Example:
Say RxResourceRequest 'FileWrite'
Output:
Resource Available
The REXX program is suspended until the resource 'FileWrite'
is available.
ΓòÉΓòÉΓòÉ 5.12.10. RxResourceRelease ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXRESOURCERELEASE(ΓöÇΓöÇnameΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Releases the named resource so that the next waiting program can obtain access
to the resource.
If the name is not passed, RXRESOURCERELEASE raises an INCORRECT CALL TO
ROUTINE from within REXX.
RXRESOURCERELEASE returns "" if successful, "Error finding resource" if the
resource name is incorrect.
Example:
Call RxResourceRelease 'FileWrite'
Output:
The resource called 'FileWrite' which was previously
created is released so that other programs or threads can
access it.
Only one thread can obtain the resource at any point in time.
ΓòÉΓòÉΓòÉ 5.12.11. RxResourceQuery ΓòÉΓòÉΓòÉ
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
ΓöéOS/2 REXXΓöéVisPro/REXXΓöéVX-REXXΓöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
ΓöÇΓöÇΓöÇRXRESOURCEQUERY(ΓöÇΓöÇnameΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
Returns the number of threads that are waiting for a resource.
If the name is not passed, RXRESOURCEQUERY raises an INCORRECT CALL TO ROUTINE
from within REXX.
RXRESOURCEQUERY returns a number if successful, "Error finding resource" if the
resource name is incorrect, or "Error querying resource" if some other error
occurs.
Example:
numWaiters = RxResourceQuery('FileWrite')
Say 'There are' numWaiters' threads waiting to write to the file.'
Output:
There are 5 threads waiting to write to the file.
ΓòÉΓòÉΓòÉ <hidden> RxEventCreate name, status ΓòÉΓòÉΓòÉ
The status parameter should be either 'Occurred' or 'Waiting'. Only the first
character is significant, and defaults to 'Waiting'.
ΓòÉΓòÉΓòÉ <hidden> RxEventWaitFor name, timeout ΓòÉΓòÉΓòÉ
The timeout parameter should be either a time specified in milliseconds or
'Forever'. Only the first character of 'Forever' is significant.
'Forever' is the default.
ΓòÉΓòÉΓòÉ <hidden> RxResourceCreate name, status ΓòÉΓòÉΓòÉ
The status parameter should be either 'Owned' or 'Unowned'. Only the first
character is significant, and defaults to 'Unowned'.
ΓòÉΓòÉΓòÉ <hidden> RxResourceRequest name, timeout ΓòÉΓòÉΓòÉ
The timeout parameter should be either a time specified in milliseconds or
'Forever'. Only the first character of 'Forever' is significant.
'Forever' is the default.
ΓòÉΓòÉΓòÉ 6. RxExtras.LIB ΓòÉΓòÉΓòÉ
RxExtras.LIB is a library file for use in C programming.
If you want to use some of the functions in RxExtras in your own C code, you
need to link with RxExtras.LIB when you are building your application.
All functions exported from RxExtras.LIB are callable from REXX and therefore
have the following function prototype :-
ULONG Name(PSZ pszFnName,
ULONG ulArgc,
RXSTRING rxArgv[],
PSZ pszQName,
PRXSTRING prxReturn)
The following is a list of all functions exported in RxExtras.LIB
o RxRead
o RxWrite
o RxBootDrive
o RxVolumeLabel
o RxVarDump
o RxStemCopy
o RxExtra
o RxSort
o RxSwitchTo
o RxQuerySwitchlist
o RxListBoxFromFile
o RxListBoxFromStem
o RxQueryDriveType
o RxSearchPath
o RxGetItemFromListBox
o RxSetSpinButtonRangeWithIncrement
o RxSetSpinButtonCharRange
o RxSetSpinButtonRangeFromStem
o RxGetItemFromListBoxAtIndex
o RxSetGlobal
o RxGetGlobal
o RxGetListBoxCount
o RxListBoxToFile
o RxListBoxToStem
o RxAddItemAtIndex
o RxMorphButtonToIcon
o RxSearchItem
o RxSetAccelTable
o RxQueryAccelTable
o RxQueryWindow
o RxQueryClassName
o RxQueryFonts
o RxLineCount
o RxMaximize
o RxMinimize
o RxRestore
o RxThread
o RxKillThread
o RxSuspendThread
o RxResumeThread
o RxSetThreadClass
o RxChangeThreadPriority
o RxSetIcon
o RxDrawBitmap
ΓòÉΓòÉΓòÉ 7. RxExtras.CMD ΓòÉΓòÉΓòÉ
RxExtras.CMD is a command file that will test all parts of RxExtras that can be
run from the command line.
A copy of this file is included here in case you delete it. You can easily copy
the file from the Services->Copy menu item on the action bar and then paste it
back into your favourite editor.
ΓòÉΓòÉΓòÉ 7.1. RxExtras.CMD - Source ΓòÉΓòÉΓòÉ
/* RxExtras - test for all functions in RxExtras.DLL */
Address CMD
/* rcy = RxFuncDrop('RxExtra') */
If RxFuncQuery('RxExtra') <> 0 Then
rcy = RxFuncAdd('RxExtra', 'RxExtras', 'RxExtra')
Call RxExtra "Drop" /* Drop everything */
rcy = RxFuncAdd('RxExtra', 'RxExtras', 'RxExtra')
Say 'Using version 'RxExtra("Load")' of RxExtras'
Say
Say "Testing RxBootDrive and RxRead..."
Call RxRead 'stem.', RxBootDrive()":"'\CONFIG.SYS'
Say "Your Config.Sys file should now appear"
"@PAUSE"
Do i = 1 to stem.0
Say stem.i
end /* do */
"@PAUSE"
Say
Say "Testing RxBootDrive by itself"
Say 'Your bootdrive is 'RxBootDrive()":"
"@PAUSE"
temp.0 = 5
temp.1 = "This is a test file"
temp.2 = "With this ring, I thee bed"
temp.3 = "The worlds smallest handcuff"
temp.4 = "How to win fiends and affluent people"
temp.5 = "### The last line ###"
Say
Say "Testing RxWrite by writing 5 lines to \TEMP.DAT"
Call RxWrite "temp.", "\temp.dat"
Say "Here is \TEMP.DAT"
"@type \temp.dat | more"
"@PAUSE"
"@DEL \temp.dat"
Say
Say "Testing RxVolumeLabel"
Say "Label of C is "RxVolumeLabel("C")
"@PAUSE"
Say
Drop stem.
Drop temp.
temp.1 = 1
temp.testing = "Testing is on"
temp.2 = 3
temp.testing.1 = "Life be in it"
Say "Testing RxVarDump - dumping all 'local' variables"
Call RxVarDump 'vars.'
Do i = 1 to vars.0
Say 'Variable Name:"'vars.i.name'" has the value: "'vars.i.value'"'
End
Drop vars.
"@PAUSE"
Say
Say "Testing RxStemCopy"
Say "Copy all variables from temp. to temp2."
Say "See RxVarDump above for temp. variables"
Call RxStemCopy "temp.", "temp2."
Say "Now we have..."
Call RxVarDump 'vars.'
Do i = 1 to vars.0
Say 'Variable Name:"'vars.i.name'" has the value: "'vars.i.value'"'
End
Drop vars.
"@PAUSE"
Say
Say "Testing RxSort"
temp.0 = 16
temp.1 = "This is a list"
temp.2 = "a List should be sorted"
temp.3 = "upper and Lowercase"
temp.4 = "$trange"
temp.5 = "#unny"
temp.6 = "@nd unusual"
temp.7 = "12345"
temp.8 = "123456"
temp.9 = "One isthe 9"
temp.10 = "Ten green bottles 10"
temp.11 = "Legs 11"
temp.12 = "And then some 12"
temp.13 = "Hollow weeing 13"
temp.14 = "Only 14"
temp.15 = "15"
temp.16 = "The last line!"
Say
Say "The unsorted list is..."
Say Copies('-', 50)
Do i = 1 to temp.0
Say temp.i
end /* do */
Say Copies('-', 50)
"@PAUSE"
Say
Say "Sorting in descending order gives..."
Call RxSort 'temp.', 'Descending'
Say Copies('-', 50)
Do i = 1 to temp.0
Say temp.i
end /* do */
Say Copies('-', 50)
"@PAUSE"
Say
Say "Sorting in ascending order gives..."
Call RxSort 'temp.', 'Asc'
Say Copies('-', 50)
Do i = 1 to temp.0
Say temp.i
end /* do */
Say Copies('-', 50)
"@PAUSE"
Say
Say "Testing RxSwitchTo"
Say "Switching to the desktop, hit Ctrl-Alt-Shift-O to see developers"
/* RxSwitchTo works by matching as much of the string as you give it
* to the first session.
* i.e. Call RxSwitchTo "System C"
* Will switch to the system clock.
*/
Call RxSwitchTo "OS"
If POS("Switch", result) <> 0 Then Do /* probably 2.1 */
Call RxSwitchTo "Desktop"
End
"@PAUSE"
Say
Say "Testing RxQuerySwitchListo"
Say "The programs running should now appear."
Call RxQuerySwitchList "temp."
Do i = 1 to temp.0
Say "Title: "temp.i ", Hwnd: "temp.i.hwnd", Process Id: "temp.i.pid
End /* do */
"@PAUSE"
Say
Say "Testing RxQueryDriveType for Drive C:"
Say RxQueryDriveType("C:")
"@PAUSE"
BD = RxBootDrive()
PathToSearch = BD":\OS2;"BD":\OS2\INSTALL"
Say
Say "Testing RxSearchPath looking for DATABASE.TXT in \OS2 and \OS2\INSTALL"
Say RxSearchPath(PathToSearch, 'DATABASE.TXT')
"@PAUSE"
Say
Say "Testing Global variables"
Call RxSetGlobal "SETTINGS.TX1", "This is shared memory!"
Say "The text 'This is shared memory!' should now appear..."
Say RxGetGlobal('settings.tx1')
"@PAUSE"
Say
Say "Testing RxLineCount"
LC = RxLineCount(RxBootDrive()':\config.sys')
Say 'There are 'LC' lines in the your CONFIG.SYS file'
"@PAUSE"
Say
Say "Testing RxGetEXEName"
Say "The command line for this program was '"RxGetEXEName()"'"
"@PAUSE"
Say
Say "Testing RxNap"
Say "This program should appear to sleep for half a second"
Call RxNap 500
"@PAUSE"
Say
Say "Testing RxFileExists"
If (RxFileExists(RxBootDrive()":\CONFIG.SYS")) Then
Say "I found your CONFIG.SYS!"
"@PAUSE"
Say
Say "Testing RxKillProcess"
Say "Please note the following output for processes to kill"
Say "(and remember to convert the process from hex to decimal)"
"@PSTAT /C | MORE"
Call Charout ,"Enter a process id to be killed ?"
Parse Pull id
Say "Kill process returned: "RxKillProcess(id)
"@PAUSE"
Say
Say "Testing RxAddFileHandles"
Say "There are currently "RxAddFileHandles(0)" handles available."
Say "Now adding 25 more. Now "RxAddFileHandles(25)" handles available."
"@PAUSE"
Say
Say "Testing RxSetFileHandles"
Say "There are currently "RxAddFileHandles(0)" handles available"
Say "Now setting this to 100."
Call RxSetFileHandles 100
Say "Now "RxAddFileHandles(0)" handles available."
"@PAUSE"
Say
Say "Testing RxMatchWildCard"
MF = 'MYFILE.cmd'
WC = '*.cmd'
Result = RxMatchWildCard(MF, WC)
If Result = MF Then
Say ' 'MF' matches Wildcard 'WC' (Edited name is:'Result')'
Else
Say ' 'MF' does not match Wildcard 'WC' (Edited name is:'Result')'
MF = 'MYFILE.cmd'
WC = '*.bbb'
Result = RxMatchWildCard(MF, WC)
If Result = MF Then
Say ' 'MF' matches Wildcard 'WC' (Edited name is:'Result')'
Else
Say ' 'MF' does not match Wildcard 'WC' (Edited name is:'Result')'
Say
Say "All testing is now over..."
"@PAUSE"
Call RxExtra "Drop"
ΓòÉΓòÉΓòÉ 8. Registration/Support ΓòÉΓòÉΓòÉ
Registration
Support
Future Enhancements
Trademarks
ΓòÉΓòÉΓòÉ 8.1. Registration ΓòÉΓòÉΓòÉ
This software package is distributed as Shareware. Non-corporate users are
granted the right to use and evaluate the usefulness of RxExtras, and to
distribute the package, intact, by any medium.
Continued use of RxExtras requires formal registration of the software.
Distribution of any software which requires RxExtras APIs by persons who have
not paid their registration fee is illegal. Users acquiring a software package
which requires RxExtras may freely use RxExtras with that package without being
required to submit payment for RxExtras. However, such Users are required to
pay for RxExtras if the User creates his/her own programs which utilize the
RxExtras APIs.
If you find this package useful and use it, register for $25 Australian ($18 US
approx) at the address below by faxing, emailing or calling with your credit
card details, or by sending a money order for the US dollar amount to the
address below.
Use of this package in any commercial product is illegal without registration
and licensing.
License arrangements can be made via:
o Compuserve (100026,470)
o Internet (10026.470@compuserve.com)
o Voice Telephone (61-2-904-1988)
o FAX Telephone (61-2-953-9401)
o Mail:
Dion Gillard
162 Ben Boyd Rd,
Neutral Bay, NSW, 2089
Australia
ΓòÉΓòÉΓòÉ 8.2. Support ΓòÉΓòÉΓòÉ
If you have any questions or would like some other functions added, please
contact me on Compu$erve (100026,470) or via Internet at
100026.470@compuserve.com
ΓòÉΓòÉΓòÉ 8.3. Future Enhancements ΓòÉΓòÉΓòÉ
If you have any ideas for future improvement of RxExtras, please contact me
with your suggestions. Some of the ideas I am considering in future releases
are:
Function Description
VX-REXX insert code Insert code function for VX-REXX
WORDX A version of REXX's WORD function that uses
any delimiter specified (e.g. commas), rather
than just a space.
REPLACE Replace a string within another string
RxReplace Replace a given string of text with another in
a file.
RxFind Find file(s) which have a given string of text
within them.
RxRun Start a thread of execution within the current
session.
RxKillDir Delete a subdirectory, all of its files, and
all of its subdirectories.
ΓòÉΓòÉΓòÉ 8.4. Trademarks ΓòÉΓòÉΓòÉ
VisPro/Rexx is a registered trademark of HockWare, Inc.
VX-Rexx is a registered trademark of Watcom, Inc.
RxExtras is copyrighted Dion Gillard, 1992 1993.
CompuServe is a registered trademark of CompuServe, Inc.