REXX Tips & Tricks:General

From EDM2
Jump to: navigation, search

This section contains general information about this document.

History

Release History of this document

Version Release
3.60 01.07.2004 26th public release
a few Bug corrections and a lot of Updates & New entries
3.50 01.07.2003 25th public release
a few Bug corrections and a lot of Updates & New entries
3.40 01.04.2003 24th public release
a few Bug corrections and a lot of Updates & New entries
3.30 01.07.2002 23th public release
a few Bug corrections and a lot of Updates & New entries
3.20 10.08.2001 22th public release
a few Bug corrections and a lot of Updates & New entries
3.10 10.01.2001 21th public release
a few Bug corrections and a lot of Updates & New entries
3.00 10.02.2000 20th public release
a few Bug corrections and a lot of Updates & New entries
2.90 10.04.1999 19th public release
a few Bug corrections and a lot of Updates & New entries
2.80 10.09.1998 18th public release
a few Bug corrections and a lot of Updates & New entries
2.70 10.10.1997 17th public release
a few Bug corrections and a lot of Updates & New entries
2.60 10.08.1997 16th public release
a few Bug corrections and a lot of Updates & New entries
2.50 10.02.1997 15th public release
a few Bug corrections and a lot of Updates & New entries
2.40 10.12.1996 14th public release
a few Bug corrections and a lot of Updates & New entries
2.30 10.10.1996 13th public release
a few Bug corrections and a lot of Updates & New entries
2.20 10.06.1996 12th public release
a few Bug corrections and a lot of Updates & New entries
2.10 10.04.1996 11th public release
a few Bug corrections and a lot of Updates & New entries
2.00 10.02.1996 10th public release
a few Bug corrections and a lot of Updates & New entries
1.90 10.12.1995 Ninth public release
a few Bug corrections and a lot of Updates & New entries
1.80 10.10.1995 Eighth public release
a few Bug corrections and a lot of Updates & New entries
1.70 10.08.1995 Seventh public release
a few Bug corrections and a lot of Updates & New entries
1.60 10.06.1995 Sixth public release
a few Bug corrections and some Updates & New entries
Note that the history sections for the versions 1.20, 1.30, 1.40 and 1.50 are only of interest for German users who already have one of the previous versions of REXX Tips & Tricks.
1.50 10.04.1995 Fifth public release
a few Bug corrections and a lot of New entries
This is the first English release!
1.40 10.02.1995 Fourth public release
a few Bug corrections and a lot of New entries
This was the last German release!
1.30 10.12.1994 Third public release
a few Bug corrections and a few New entries
1.20 20.10.1994 Second public release
a few Bug corrections and a lot of New entries
1.10 25.08.1994 First public release
1.00 17.07.1994 First internal release

Sources

All Tips & Tricks mentioned in this document without an accompanying note about citing the source (see Credits) are results of my development of REXX programs.

I tested nearly all source code included in this document while developing my REXX programs.

I've used the following OS/2 versions for the tests:

  • OS/2 2.1 + ServicePack (German)
  • OS/2 2.11 (German)
  • OS/2 2.99 WARP BETA II (US)
  • OS/2 WARP Version 3.0 (German)
  • OS/2 WARP Version 3.0 Fullpack (US)
  • OS/2 WARP Version 3.0 Fullpack (German)
  • OS/2 WARP Connect (US, w/ & w/o Fixpacks)
  • OS/2 WARP Connect (German, w/ & w/o Fixpacks)
  • OS/2 WARP Server (Beta September 1995, US)
  • OS/2 WARP Version 9.99 Merlin Beta June 96
  • OS/2 WARP Version 4 (US w/ & w/o Fixpacks)
  • OS/2 WARP Version 4.5 CP2 (US w/ & w/o Fixpacks)

Used Material

I've used material from the following individuals in this document:

  • Detlev Ahlgrimm - MATCH function in REXX
  • Peter Bunney - Change the WPS archive flag
  • B.E. Chi - Math. functions
  • Ian Collier - Shellsort routine - 2 -
  • Albert Crosby - CMDLINE.CMD
  • Phil Dumitru - Object IDs of Network applications
  • Rony Flatscher - Another sort routine
  • Richard K. Goran - Source code, hints and a more
  • Georg Haschek - Get the desktop directory, Get a list of all printers
  • Ned Konz - Set or get the WPS lockup password
  • Jamie Hoglund - Get the current cursor position
  • Bruce E. Högman - Get the current boot drive
  • Ross Patterson - SOUNDEX routine(s)
  • Steve Pitts - Shellsort routine - 1 -, Unpack packed data
  • Andreas Pohlmann - Flexible Quick sort
  • Yuri Pogrebnyak - base64 decoder, base64 encoder, and the base64 decoder routine in Template for an installation program
  • Bob Price - SQRT routine
  • Bernie Schneider - sprintf routine for REXX
  • Dirk Terrell - Heapsort routine
  • Ruediger Wilke - Fast Quick sort
  • John Wunderlin - Read a file using CharIn()

Hints and Bug Reports

This section contains a list of all users who send me new material for RXT&T, hints, and bug reports regarding RXT&T.

  • Boess, Tilmann - bug report about The DETACH command
  • Berghaus, Robert - Correction forConvert values from/to INTEL format and Delete a directory(-tree)
  • Boll, Dave - Additional information about his REXX packages
  • Daney, Charles - Bug report
  • Danvers, Robert - A lot of corrections for spelling errors
  • Davis, Thos - Additional information about using DrDialog with Object-Oriented REXX
  • Duerbusch, Tom - Bug in the section Closing files
  • Eymont, Voytek - Bug reports and new information
  • Geus, Marcus De - information about his web page
  • Goran, Dick - Various bug reports
  • Groves Jr., Don E. - bug report
  • Hadam, Martin - New Information for RXT&T.
  • Hanoian, Martin S. - Information about the OS/2 Shareware BBS and bug reports
  • Heidelbach, Oliver - Convert ASCII 850 string into/from ISO 8859-1 (1004) string, Count lines in a file quickly - 2 -
  • Hessling, Mark - Some corrections and additional information about his REXX packages
  • Hicks, Dave - see the forewords for version 1.70, version 2.00, and version 2.80
  • Langanke, Christian - The keyword ICONRESOURCE
  • Lemon, Barry - Additional information for Parameter eaten by the CMD.EXE
  • Levine, Steven - New infos for PMDll and a new text for the readme file
  • Mahoney, Robert - Additional information about his REXX packages
  • Maerkisch, Bastian - VX/REXX Buglist
  • Mediavilla, David - Some bug corrections
  • Michelinakis, Dimitris 'sehh' - Some bug corrections
  • Platschek, Michael - The function SysDestroyObject, Check if a program is running (using RXU.DLL)
  • Plungjan, Michel - Writing OS independent programs and bug reports
  • Pollak, Michael - Information about GNU Regina - REXX for DOS
  • Pool, Arthur - the section Investigate the overheads of function calls, and various corrections for the sort algorithms and other sections
  • Putman, Harold - correction for the section Internet -- WWW, Using REXX queues for global variables
  • Romain, Petges - Using REXX queues to simulate a semaphore
  • Rosenau, Herbert - Bug reports for RXT&T
  • Salak, Juraj - bug report for Get a name for a temporary file
  • Seitz, John - SysCls
  • Semo, Mario - Bug reports for Object REXX (OS/2 & NT version)
  • Schneller, Erik - Check if ANSI is active - 2 -
  • Schwarz, Armin - Information about using SHUTDWN.EXE
  • Sperper, Wolfram - Get the object ID for an object handle
  • Staedtler, Klaus - various hints
  • Ulrich, Ralf - Hint for MATCH function in REXX, Sample code for parameter parsing, and other information

Icons Used in REXX Tips & Tricks

The following icons are used throughout REXX Tips & Tricks for special purposes. Double-click each icon when you come to it. When activated by the double click, the icon tells RXT&T to do one of the following:

start the OS/2 system editor (the E editor) displaying the file whose filename appears to the left of the icon.

open the codemenu (i.e., the small window containing the five icons - E editor, cmd.exe shell window, REXXTRY program, and launch REXX program in PMREXX)

execute imbedded REXX statements using REXXTRY

execute imbedded REXX statements using PMREXX with the parameter /Q.

Open the web site left from the icon in a browser. This icon calls the program rxttwww.cmd with the approbiate parameters. Please note that the program rxttwww.cmd must be available through the path. An example for rxttwww.cmd is here.

Open the ftp site left from the icon in a browser. This icon calls the program rxttwww.cmd with the approbiate parameters. Please note that the program rxttwww.cmd must be available through the path. An example for rxttwww.cmd is here.

comp.lang.rexx Open the newsgroup in a newsgroup reader. This icon calls the program rxttwww.cmd with the approbiate parameters. Please note that the program rxttwww.cmd must be available through the path. An example for rxttwww.cmd is here.

Open a mail program with the mail address left from the icon. This icon calls the program rxttwww.cmd with the approbiate parameters. Please note that the program rxttwww.cmd must be available through the path. An example for rxttwww.cmd is here.

Hyperlinks to other INF files are marked with a leading <-. For example, the link <- DATE points to the description of the REXX function date() in the REXX Online documentation.

Sample rxttwww.cmd

/*--------------------------------------------------------------------------
See Icons Used in REXX Tips & Tricks for a description of this program.
The sample cmd uses NETSCDDE.EXE from the XWorkplace package.
see Using the samples for how to extract this code.
  -------------------------------------------------------------------------- */
 
/* Dispatcher for calling internet programs from within REXX Tips & Tricks   */
/*                                                                           */
/* Usage:                                                                    */
/*                                                                           */
/*    rxttwww is called by VIEW.EXE with the following parameters:           */
/*                                                                           */
/*        http www_address                                                   */
/*        news newsgroup                                                     */
/*        ftp ftp_address                                                    */
/*        mail mailAddress                                                   */
/*        cis CISAddress                                                     */
/*        fido FidoAddress                                                   */
/*                                                                           */
/* Examples:                                                                 */
/*                                                                           */
/*        rxttwww http www.ibm.com                                           */
/*        rxttwww news comp.lang.rexx                                        */
/*        rxttwww ftp ftp.ibm.com                                            */
/*        rxttwww mail Bernd.Schemmer@gmx.de                                 */
/*        rxttwww cis 100104,613                                             */
/*                                                                           */
/*                                                                           */
/* Note:                                                                     */
/*                                                                           */
/*                                                                           */
/*    This sample file uses the program NETSCDDE.EXE from the XWorkplace     */
/*    package.                                                               */
/*                                                                           */

  parse arg action iAdress

  progDesc = 'rxttwww - Dispatcher for REXX Tips & Tricks'

  select

    when action = 'http' then
    do
                    /* called to show a web site                            */
                    /* -------------------------                            */

                    /* call Netscape using NETSCDDE.EXE from the            */
                    /* XWorkplace package                                   */
      '@netscdde.exe -Xn http://' || iAdress
    end /* when */

    when action = 'ftp' then
    do
                    /* called to show a ftp site                            */
                    /* -------------------------                            */

                    /* call Netscape using NETSCDDE.EXE from the            */
                    /* XWorkplace package                                   */
      '@netscdde.exe -Xn ftp://' || iAdress
    end /* when */

    when action = 'news' then
    do
                    /* called to show a newsgroup                           */
                    /* --------------------------                           */

                    /* call Netscape using NETSCDDE.EXE from the            */
                    /* XWorkplace package                                   */
      '@netscdde.exe -Xn news://' || iAdress
    end /* when */

    when action = 'mail' then
    do
                    /* called to write an email to an internet address      */
                    /* -----------------------------------------------      */

                    /* call Netscape using NETSCDDE.EXE from the            */
                    /* XWorkplace package                                   */
      '@netscdde.exe -Xn mailto:' || iAdress
    end /* when */

    when action = 'cis' then
    do
                    /* called to write an email to a CIS address            */
                    /* -----------------------------------------            */

                    /* convert the CIS address to an internet address       */
       parse var iAdress part1 ',' part2
       iAdress = strip( part1 ) || '.' || strip( part2 ) || '@compuserve.com'

                    /* call Netscape using NETSCDDE.EXE from the            */
                    /* XWorkplace package                                   */
      '@netscdde.exe -Xn mailto:' || iAdress
    end /* when */

    when action = 'fido' then
    do
                    /* called to write an email to a FIDO address           */
                    /* ------------------------------------------           */

      say progDesc
      say
      say 'Error: I do not know how to handle FIDO addresses!'
      say
      say 'Press ENTER to exit'
      parse pull
    end /* when */

    otherwise
    do
                    /* called with a unknown keyword                        */
                    /* -----------------------------                        */

      say progDesc
      say
      say 'Error: Invalid arguments: "' || action iAdress || '"'
      say
      say 'Press ENTER to exit'
      parse pull
    end /* otherwise */

  end /* select */

'@exit'