home *** CD-ROM | disk | FTP | other *** search
-
- ΓòÉΓòÉΓòÉ 1. RxExtras Object Help ΓòÉΓòÉΓòÉ
-
- This control is used for programming.
-
- It is used by the programmer to access RxExtras functions. For more info on
- what functions are provided, see the 'Create Link' dialog for any RxExtras
- object.
-
-
- ΓòÉΓòÉΓòÉ 2. Style Page Help ΓòÉΓòÉΓòÉ
-
- There are really no styles - just the basic.
-
- We recommend that you keep the object invisible and delete it from your form
- before building. This way there is no run-time requirement, except for the
- RxExtras DLL.
-
-
- ΓòÉΓòÉΓòÉ 3. Read a file into a stemmed variable ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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 */
- . . .
-
-
- ΓòÉΓòÉΓòÉ 4. Write a stemmed variable to a file ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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. Get drive OS/2 was booted from ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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 */
-
-
- ΓòÉΓòÉΓòÉ 6. Get the volume label of a drive ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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 */
-
-
- ΓòÉΓòÉΓòÉ 7. Get a list of all local variables ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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"
-
-
- ΓòÉΓòÉΓòÉ 8. Copy a stemmed variable. ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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
-
-
- ΓòÉΓòÉΓòÉ 9. Initialise or Uninitialise RxExtras ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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.8 of RxExtras /* perhaps */
-
-
- ΓòÉΓòÉΓòÉ 10. Sorting a stemmed variable ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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.
-
- 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'
- Do Count = 1 to Stem.0
- Say Stem.Count
- End
- Say '-----------------'
- Call RxSort 'Stem.','D'
- 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...
-
-
- ΓòÉΓòÉΓòÉ 11. Switch to a running application ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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.
-
-
- ΓòÉΓòÉΓòÉ 12. Get a list of running applications ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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 */
-
-
- ΓòÉΓòÉΓòÉ 13. Load a listbox or combobox from a file ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇRXLISTBOXFROMFILE(ΓöÇΓöÇwindowΓöÇΓöÇ,ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇ,ΓöÇΓöÇfilenameΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
- ΓööΓöÇlbidΓöÇΓöÿ
-
- Places the contents of file filename into ListBox lbid of Window window.
-
- If lbid is omitted, window is assumed to be the PM handle of a list box.
-
- If window and/or filename are invalid/inaccessible, RXLISTBOXFROMFILE raises an
- INCORRECT CALL TO ROUTINE condition from within REXX. Otherwise,
- RXLISTBOXFROMFILE returns a null string.
-
- Note: This API appends to the end of any existing contents already in ListBox
- lbid.
-
- Example:
-
- Call RxListBoxFromFile window, 1000, 'C:\Config.Sys'
-
- Results:
-
- The contents of C:\Config.Sys are placed into ListBox 1000 of
- window window.
-
-
- ΓòÉΓòÉΓòÉ 14. Get the file system of a drive ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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 */
-
-
- ΓòÉΓòÉΓòÉ 15. Locate a file in a list of directories ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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 */
-
-
- ΓòÉΓòÉΓòÉ 16. Get selected item from listbox or combobox ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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 262 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.
-
-
- ΓòÉΓòÉΓòÉ 17. Set spinbutton range with increment ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇRXSETSPINBUTTONRANGEWITHINCREMENT(ΓöÇΓöÇwindowΓöÇΓöÇ,ΓöÇΓöÇsbidΓöÇΓöÇ,ΓöÇΓöÇlowΓöÇΓöÇ,ΓöÇΓöÇhighΓöÇΓöÇ,ΓöÇΓöÇΓöÇΓöÇΓöÇ
-
- ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇincrementΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ)ΓöÇΓöÇ
-
-
- Sets the SpinButton sbid of Window window to the numeric range of low to high,
- in increments of increment.
-
- If window and/or sbid are invalid, RXSETSPINBUTTONRANGEWITHINCREMENT raises the
- REXX error condition INCORRECT CALL TO ROUTINE. Otherwise,
- RXSETSPINBUTTONRANGEWITHINCREMENT returns an empty string ("").
-
- Example:
-
- Call RxSetSpinButtonRangeWithIncrement window, 4000, 0, 10000, 2000
-
- Results:
-
- The SpinButton with ID=4000 in window window 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.
-
-
- ΓòÉΓòÉΓòÉ 18. Set spinbutton character range ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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 and/or sbid are invalid, RXSETSPINBUTTONCHARRANGE raises the REXX
- error condition INCORRECT CALL TO ROUTINE. Otherwise, RXSETSPINBUTTONCHARRANGE
- returns an empty string ("").
-
- Example:
-
- Call RxSetSpinButtonCharRange Hwindow, 4000, 'a', 'z'
-
- Results:
-
- The SpinButton with ID=4000 in window Hwindow now contains the
- selection character set 'a' through 'z', inclusive.
-
-
- ΓòÉΓòÉΓòÉ 19. Get item value at index from listbox or combobox ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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.
-
-
- ΓòÉΓòÉΓòÉ 20. Set System wide global variable ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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!
-
-
- ΓòÉΓòÉΓòÉ 21. Get System wide global variable ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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!
-
-
- ΓòÉΓòÉΓòÉ 22. Pause the program ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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
-
-
- ΓòÉΓòÉΓòÉ 23. Save a listbox or combox box to a file ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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.
-
- Example:
-
- Call RxListBoxToFile window, 1000, 'C:\MyData.Dat'
-
- Results:
-
- The contents of ListBox 1000 of window window are written to
- file C:\MyData.Dat.
-
-
- ΓòÉΓòÉΓòÉ 24. Save a listbox or combox box to a stemmed variable ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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 destroys 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.
-
-
- ΓòÉΓòÉΓòÉ 25. Set text button to icon ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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 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.
-
- Example:
-
- value = VpLoadPicture('FILE','C:\TEMP\OS2CMD.ICO')
- Call RxMorphButtonToIcon window, 2000, value
- or
- Call RxMorphButtonToIcon window, id, 'MYDLL', 3
-
- Results:
-
- The PushButton with ID=2000 in window 'window'
- is changed to an OS/2 Command-Prompt icon (stored previously in
- C:\TEMP\OS2CMD.ICO, or as ICON number 3 in MYDLL.DLL)
-
-
- ΓòÉΓòÉΓòÉ 26. Search a listbox or combobox ΓòÉΓòÉΓòÉ
-
- 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.
-
-
- ΓòÉΓòÉΓòÉ 27. Get related PM window handle ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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.
-
- Example:
-
- WinParent = RxQueryWindow(window, 'Parent')
-
- Results:
-
- The parent window handle, in decimal, for window 'window'
- is placed in the variable WinParent.
-
-
- ΓòÉΓòÉΓòÉ <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.
-
-
- ΓòÉΓòÉΓòÉ 28. Get window class name ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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.
-
- Example:
-
- WinClass = RxQueryClassName(window)
-
- Results:
-
- The Class Name of window 'window' is placed in the variable WinClass.
-
-
- ΓòÉΓòÉΓòÉ 29. Get line count for a file ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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 */
-
-
- ΓòÉΓòÉΓòÉ 30. Maximize a window ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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 ("").
-
- Example:
-
- Call RxMaximize window
-
- Results:
-
- The window 'window' is maximized.
-
-
- ΓòÉΓòÉΓòÉ 31. Minimize a window ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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 ("").
-
- Example:
-
- Call RxMinimize window
-
- Results:
-
- The window 'window' is minimized.
-
-
- ΓòÉΓòÉΓòÉ 32. Restore a window ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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 ("").
-
- Example:
-
- Call RxRestore window
-
- Results:
-
- Restores the window 'window' from a minimised state.
-
-
- ΓòÉΓòÉΓòÉ 33. Load a bitmap into a free form window ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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 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'.
-
- Example:
-
- value = VpLoadPicture('FILE','C:\OS2\BITMAP\OS2LOGO.BMP')
- Call RxDrawBitmap window, 2000, value
-
- Results:
-
- The Free From window with ID=2000 in window 'window'
- has the OS2LOGO bitmap drawn inside it or 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.
-
-
- ΓòÉΓòÉΓòÉ 34. Scroll a listbox ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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 ("").
-
- REXX Example:
-
- Call RxScrollListBox window, 1000, -3
-
- Results:
-
- The contents of ListBox 1000 of window window will be scrolled
- up 3 lines
-
-
- ΓòÉΓòÉΓòÉ 35. Set/Get listbox item associated text ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇRXLISTBOXITEMHANDLE(ΓöÇΓöÇwindowΓöÇΓöÇ,ΓöÇ[ΓöÇΓöÇlistboxidΓöÇΓöÇ]ΓöÇ,ΓöÇΓöÇindexΓöÇΓöÇ[,ΓöÇΓöÇvalueΓöÇΓöÇ])ΓöÇΓöÇΓöÇ
-
-
- This call either sets or queries 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.
-
- Example:
-
- Call RxListBoxItemHandle window, 1000, 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.
-
-
- ΓòÉΓòÉΓòÉ 36. Get executable program name ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇRXGETEXENAME(ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ
-
-
- Returns the name of the executable currently running your REXX Code.
-
- Example:
-
- Say "The current running program is "RxGetEXEName()
-
- Results:
-
- The current running program is CMD.EXE /* possibly */
-
-
- ΓòÉΓòÉΓòÉ 37. Get a list of available printers ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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
-
-
- ΓòÉΓòÉΓòÉ 38. Set the default printer queue ΓòÉΓòÉΓòÉ
-
- 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.
-
-
- ΓòÉΓòÉΓòÉ 39. Display the job properties dialog for a queue ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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.
-
-
- ΓòÉΓòÉΓòÉ 40. Write a stemmed variable to a printer queue ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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.
-
-
- ΓòÉΓòÉΓòÉ 41. Create an event semaphore ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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.
-
-
- ΓòÉΓòÉΓòÉ <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.
-
-
- ΓòÉΓòÉΓòÉ 42. Destroy an event semaphore ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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.
-
-
- ΓòÉΓòÉΓòÉ 43. Wait for an event to occur ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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.
-
-
- ΓòÉΓòÉΓòÉ 44. Set event occurred ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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.
-
-
- ΓòÉΓòÉΓòÉ 45. Reset event state ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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
-
-
- ΓòÉΓòÉΓòÉ 46. Get event occurred count ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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 = RxEventQuery('FileLoad')
- Say 'The file was loaded' numTimes' times.'
-
- Output:
-
- The file was loaded 5 times.
-
-
- ΓòÉΓòÉΓòÉ 47. Create a serial resource ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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.
-
-
- ΓòÉΓòÉΓòÉ 48. Destroy a serial resource ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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.
-
-
- ΓòÉΓòÉΓòÉ 49. Request a serial resource ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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.
-
-
- ΓòÉΓòÉΓòÉ 50. Release a serial resource ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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.
-
-
- ΓòÉΓòÉΓòÉ 51. Get resource wait count ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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.
-
-
- ΓòÉΓòÉΓòÉ 52. File exists? ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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 */
-
-
- ΓòÉΓòÉΓòÉ 53. Get item text ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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.
-
- Example:
-
- value = RxWindowQueryText(window, 1001)
- /* id 1001 is an MLE */
-
- Results:
-
- Places the text of the window into the variable value.
-
-
- ΓòÉΓòÉΓòÉ 54. Kill a process ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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: Process id's can be obtained using the OS/2 command PSTAT or by using
- the RxExtras function RxQuerySwitchList.
-
-
- ΓòÉΓòÉΓòÉ 55. Set the number of file handles. ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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 */
-
-
- ΓòÉΓòÉΓòÉ 56. Set the relative number of file handles. ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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, or is not greater than 0.
-
- 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
-
-
- ΓòÉΓòÉΓòÉ 57. Match a filename to a wild card ΓòÉΓòÉΓòÉ
-
- ΓöÇΓöÇΓöÇ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
-