home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rexxtut2.zip / rexx.faq next >
Text File  |  1993-11-17  |  16KB  |  385 lines

  1.  
  2. A postscript version of this file is available on rexx.uwaterloo.ca
  3. as the file /pub/rexxfaq.ps, and a Word for Windows version as the
  4. file /pub/rexxfaq.doc.
  5.  
  6.                                               The REXX SourceBook
  7.                             Frequently Asked Questions About REXX
  8.                                                                  
  9.                                      Last Revised:  July 22, 1993
  10.                                                                  
  11.                                                      Eric Giguere
  12.                                              giguere@watcom.on.ca
  13.  
  14.  
  15. ----------------------------------------------------------------
  16. Copyright Information
  17.  
  18.      This document is copyright )1993 by Eric Giguhre.
  19.      Permission is granted to reproduce and distribute all or
  20.      part of this document for non-commercial purposes only.  All
  21.      other uses must first be cleared with the author.  The
  22.      author may be contacted on the Internet at the address
  23.      giguere@watcom.on.ca or on paper by writing to WATCOM
  24.      International, 415 Phillip Street, Waterloo, Ontario,
  25.      Canada, N2L 3X2.  Please note, however, that this document
  26.      is not published or endorsed by WATCOM.
  27.      
  28. ----------------------------------------------------------------
  29. Introduction
  30.  
  31.      This document is intended to serve as a useful reference for
  32.      REXX-related information.  It aims for breadth as opposed to
  33.      depth, and references to other material are given where
  34.      appropriate.  Suggestions and updates should be sent to the
  35.      author in an attempt to keep this document relevant and up-
  36.      to-date.
  37.      
  38. ----------------------------------------------------------------
  39. A. What Is REXX?
  40.  
  41.      REXX is a programming language designed by Michael Cowlishaw
  42.      of IBM UK Laboratories.  In his own words:  "REXX is a
  43.      procedural language that allows programs and algorithms to
  44.      be written in a clear and structured way."
  45.      REXX doesn't look that different from any other procedural
  46.      language.  Here's a simple REXX program:
  47.      
  48.           /* Count some numbers */
  49.           
  50.           say "Counting..."
  51.           do i = 1 to 10
  52.               say "Number" i
  53.           end
  54.      
  55.      What makes REXX different from most other languages is that
  56.      it is also designed to be used as a macro language by
  57.      arbitrary application programs.  The idea is that
  58.      application developers don't have to design their own macro
  59.      languages and interpreters.  Instead they use REXX as the
  60.      macro language and support the REXX programming interface.
  61.      If a REXX macro comes across an expression or function call
  62.      that it cannot resolve, it can ask the application to handle
  63.      it instead.  The application only has to support the
  64.      features that are specific to it, freeing the developer from
  65.      handling the mundane (and time-consuming) task of writing a
  66.      language interpreter.  And if all applications use REXX as
  67.      their macro language, the user only has to learn one
  68.      language instead of a dozen.
  69.      
  70. ----------------------------------------------------------------
  71. B. REXX and the Internet
  72.  
  73.      Networks connect computers in various ways for the exchange
  74.      of data.  The terminology is a bit confusing to the new
  75.      user.  Here are the definitions this document uses:
  76.  
  77.        Usenet: Not really a network, just the set of machines
  78.        that exchange network news.  Network news is really an
  79.        extended form of electronic mail that groups messages
  80.        from individuals into newsgroups that users can read
  81.        using special newsreaders.
  82.  
  83.        Internet: The worldwide network based on TCP/IP
  84.        protocols.  Besides being able to receive mail and
  85.        newsgroups, these machines can use programs like ftp and
  86.        telnet to communicate with other machines in real time.
  87.        Most Internet machines are Unix-based.
  88.  
  89.        BITNET: The worldwide network that connects many IBM
  90.        mainframes.  BITNET users can also transfer files using
  91.        methods that are incompatible with those of the Internet.
  92.      
  93.      Newsgroups
  94.  
  95.      The Usenet group comp.lang.rexx exists for discussion of
  96.      REXX in all its variations.  Anything posted to this
  97.      newsgroup also gets sent to the REXXLIST mailing list (see
  98.      below) and vice-versa.
  99.  
  100.      Other newsgroups of interest are machine-specific.
  101.      Recommended groups are comp.os.os2.programmer and
  102.      comp.sys.amiga.programmer.
  103.      
  104.      FTP Sites of Interest
  105.  
  106.      FTP is a file transmission protocol used on the Internet to
  107.      transfer files between machines.  The transfers are done in
  108.      real time and usually require that the user have an account
  109.      on both machines.  However, many machines on the Internet
  110.      support what is known as anonymous FTP, which allows users
  111.      on other machines access to a limited set of files without
  112.      requiring an account.  Some of the more interesting sites
  113.      that offer this service are:
  114.  
  115.         rexx.uwaterloo.ca        General repository for REXX-related
  116.                                  information, including free REXX
  117.                                  interpreters for Unix and DOS.  An
  118.                                  XEDIT clone for Unix and OS/2 may
  119.                                  also be found here.  Look under
  120.                                  /pub/rexx.
  121.  
  122.         flipper.pvv.unit.no      The official home of Regina, one of
  123.                                  the free Unix interpreters.  An
  124.                                  archive of the messages in
  125.                                  comp.lang.rexx is also maintained
  126.                                  here.  Check under /pub/rexx.
  127.  
  128.         ftp-os2.cdrom.com        General OS/2 archives.  Look under
  129.         ftp.luth.se              /pub/os2.
  130.                                       
  131.         wuarchive.wustl.edu      General Amiga archive.  Look under
  132.                                  /pub/aminet.
  133.      
  134.      Mailing Lists
  135.  
  136.      Mailing lists are similar to newsgroups but use normal
  137.      electronic mail to deliver the messages.  The following
  138.      mailing lists are mostly BITNET-based but are accessible
  139.      from the Internet as well:
  140.      
  141.        List name     BITNET      Internet           Discusses
  142.                       Node        Address
  143.        REXXLIST      UCF1VM    ucf1vm.cc.ucf.edu    REXX in general
  144.         AREXX-L      UCF1VM    ucf1vm.cc.ucf.edu    Amiga REXX
  145.         PC-REXX      UCF1VM    ucf1vm.cc.ucf.edu    Personal REXX
  146.        REXXCOMP      UCF1VM    ucf1vm.cc.ucf.edu    IBM's REXX compiler
  147.        TSO-REXX      UCF1VM    ucf1vm.cc.ucf.edu    TSO REXX
  148.         VM-REXX      UCF1VM    ucf1vm.cc.ucf.edu    VM/SP REXX
  149.         UREXX-L      (none)    liverpool.ac.ak      Unix REXX
  150.      
  151.      To subscribe to any of these lists, send a one-line message
  152.      to the address LISTSERV@node, where node is the BITNET node
  153.      or Internet address for the list you wish to join.  In the
  154.      body of your message should be the line
  155.                SUBSCRIBE list-name your--full-name
  156.      as in
  157.                  SUBSCRIBE UREXX-L Eric Giguere
  158.      You will then be subscribed to the list and messages will
  159.      start arriving in your mailbox.  To send a message to the
  160.      list, simply mail it to listname@node, as in UREXX-
  161.      L@liverpool.ac.uk.  Note the distinction between the
  162.      LISTSERV address and the listname address.  You can receive
  163.      help by sending a HELP message to the LISTSERV address.
  164.      Note that some of these mailing lists may be available on
  165.      Usenet in the form of newsgroups with names starting with
  166.      "bit.listserv".  Ask your system administrator if you're not
  167.      sure.
  168.  
  169.      Thanks to Scott Ophof for providing this summary.
  170.      
  171.      Gopher Service
  172.  
  173.      Gopher clients may find REXX-related information at the site
  174.      bigblue.pvv.unit.no.
  175.      
  176. ----------------------------------------------------------------
  177. C. Free REXX Products
  178.  
  179.      
  180.      Interpreters
  181.  
  182.      There are at least three REXX interpreters available for
  183.      free on the Internet.  The first two are Unix based and are
  184.      well-supported by their authors.  The third is an MS-DOS
  185.      interpreter.
  186.  
  187.      Regina is Anders Christensen's REXX interpreter for various
  188.      flavours of Unix and VMS.  It is fairly complete and Anders
  189.      even has an API for developers.  It also apparently can be
  190.      ported to OS/2.  Anders can be reached at
  191.      anders@pvv.unit.no.  Regina's official home is
  192.      flipper.pvv.unit.no.
  193.  
  194.      REXX/imc is Ian Collier's REXX interpreter for SunOS, though
  195.      it has also been ported to other Unix systems.  Ian can be
  196.      reached at imc@prg.ox.ac.uk.
  197.  
  198.      BREXX is Bill Vlachoudis' REXX interpreter for MS-DOS.  The
  199.      interpreter is not complete but is quite small.  Bill can be
  200.      reached at bill@donoussa.physics.auth.gr.
  201.  
  202.      All three interpreters are available for anonymous FTP on
  203.      rexx.uwaterloo.ca in the /pub/freerexx directory, each
  204.      interpreter in its own subdirectory.  Regina and REXX/imc
  205.      are in source form, BREXX is only available as binary.
  206.      
  207.      REXX-Aware Text Editors
  208.  
  209.      Also on rexx.uwaterloo.ca in the /pub/editors directory is
  210.      the text editor THE by Mark Hessling
  211.      (mark@snark.itc.gu.edu.au).  THE is a full-featured
  212.      XEDIT/KEDIT clone (by XEDIT here we mean the IBM mainframe
  213.      text editor, not the X Windows editor xedit) with REXX
  214.      support.  THE is available in versions for OS/2 and Unix.
  215.      THE's official home is on ftp.gu.edu.au in /src/THE.
  216.      
  217. ----------------------------------------------------------------
  218. D. Commercial REXX Products
  219.  
  220.      Interpreters
  221.  
  222.      REXX interpreters are available commercially for a wide
  223.      variety of systems and come standard on some operating
  224.      platforms such as the Amiga, OS/2 and the IBM mainframes.
  225.      The following vendors sell REXX interpreters:
  226.      
  227.           The Workstation Group     [Various UNIX platforms, also VMS]
  228.           6300 River Road
  229.           Rosemont, IL  60018
  230.           (800) 228-0255 (US only)
  231.           sales@wrkgrp.com
  232.      
  233.           Quercus Systems          [DOS, Windows, Windows NT, OS/2]
  234.           P.O. Box 2157
  235.           Saratoga, CA  95070
  236.           (408) 867-7399
  237.      
  238.           Kilowatt Software        [DOS, Windows, Tandem]
  239.           P.O. Box 209
  240.           Reynoldsburg, Ohio  43068
  241.           (800) 848-9474 (US only)
  242.           (614) 866-4300
  243.      
  244.      Compilers
  245.  
  246.      Although REXX is usually thought of as an interpreted
  247.      language, it can also be compiled.  The following vendors
  248.      all sell REXX compilers:
  249.      
  250.           Dineen Edwards Group          [Amiga]
  251.           19785 West 12 Mile Road, Suite 305
  252.           Southfield, MI  48076-2553
  253.           (313) 352-4288
  254.      
  255.           IBM                 [MVS/TSO and VM/CMS]
  256.           Contact your local representative
  257.      
  258.           Systems Center           [VM/CMS]
  259.           1800 Alexander Bell Drive
  260.           Reston, VA  22091
  261.      
  262.      Visual Development Environments
  263.  
  264.      There are two REXX-based visual development environments
  265.      available for OS/2:
  266.      
  267.           VX-REXX        WATCOM International
  268.                          415 Phillip Street
  269.                          Waterloo, Ontario
  270.                          Canada  N2L 3X2
  271.                          Phone: (519) 886-3700
  272.                          Fax: (519) 747-4971
  273.      
  274.           VisPro/REXX    HockWare
  275.                          P.O. Box 336
  276.                          Cary, NC 27512-0336
  277.                          Phone: (919) 387-7391
  278.                          Fax: (919) 380-0757
  279.      
  280.      REXX-Aware Text Editors
  281.  
  282.      Clones of the popular XEDIT editor are available for Unix
  283.      from the Workstation Group (see address above) and for DOS
  284.      and OS/2 from Mansfield Software.
  285.      
  286.           Mansfield Software
  287.           P.O. Box 532
  288.           Storrs, CT  06268
  289.           Phone: (203) 429-8402
  290.           Fax: (203) 487-1185
  291.      
  292.      The OS/2 Enhanced Editor (EPM.EXE), which is bundled with
  293.      OS/2, also has REXX support.  Use its online help and search
  294.      for the 'rx' command.
  295.      
  296. ----------------------------------------------------------------
  297. E. REXX and ANSI
  298.  
  299.      The American National Standards Institute (ANSI) sets
  300.      national standards for various things in the United States,
  301.      including programming languages.  The X3J18 REXX Standards
  302.      Committee is currently defining a formal standard for the
  303.      REXX language, using Mike Cowlishaw's book as its base
  304.      document.  The Committee meets 3 or 4 times a year and holds
  305.      ongoing discussions throughout the year by electronic mail.
  306.      Members of X3J18 are mostly REXX implementors, but anyone
  307.      can participate.  The Committee intends to release a draft
  308.      standard next year.  More information can be had from the
  309.      vice-chair, Neil Milsted at nfnm@wrkgrp.com.
  310.      Note that public ANSI documents relating to X3J18 can be had
  311.      using the LISTSERV service at PSUVM on BITNET or by Gopher
  312.      to bigblue.pvv.unit.no on the Internet.
  313.      
  314. ----------------------------------------------------------------
  315. F. REXX Bibliography
  316.  
  317.      Mike Cowlishaw has kindly provided the following partial
  318.      bibliography of REXX books.
  319.      
  320.           The REXX Language -- M.F. Cowlishaw
  321.                English:       ISBN 0-13-780735-X  Prentice-Hall, 1985
  322.                          ISBN 0-13-780651-5  2nd edition, 1990
  323.                German:   ISBN 3-446-15195-8  Carl Hanser Verlag, 1988
  324.                          ISBN 0-13-780784-8  P-H International, 1988
  325.                Japanese: ISBN 4-7649-0136-6  Kindai-kagaku-sha, 1988
  326.      
  327.           Modern Programming Using REXX -- Robert P. O'Hara and
  328.                David R. Gomberg
  329.                English:  ISBN 0-13-597311-2  Prentice-Hall, 1985
  330.                          ISBN 0-13-579329-5  2nd edition, 1988
  331.      
  332.           REXX in the TSO Environment -- Gabriel F. Gargiulo
  333.                ISBN 0-89435-354-3, QED Information Systems Inc.
  334.                320 pages, 1990.
  335.      
  336.           Practical Usage of REXX -- Anthony S. Rudd
  337.                ISBN 0-13-682790-X, Ellis Horwood (Simon & Schuster), 1990
  338.      
  339.           Using ARexx on the Amiga -- Chris Zamara and Nick Sullivan
  340.                ISBN 1-55755-114-6, Abacus Books, 1991
  341.      
  342.           The REXX Handbook -- Edited by Gabe Goldberg and Phil Smith III
  343.                ISBN 0-07-023682-8, McGraw-Hill, 1991
  344.      
  345.           Programming in REXX -- Charles Daney
  346.                ISBN 0-07-015305-1, McGraw-Hill, 1992
  347.      
  348.           Command Language Cookbook -- Hallett German
  349.                ISBN 0-442-00801-5, Van Nostrand Reinhold, 1992
  350.      
  351. =====================================================================
  352. G. Frequently Asked Questions
  353.  
  354.      -----------------------------------------------------------
  355.      1. Is REXX better than <some other language>?
  356.  
  357.      Short answer:  Yes.  No.  Maybe.  Does it matter?
  358.  
  359.      Long answer:  This question wastes a lot of bandwidth in
  360.      comp.lang.rexx and other newsgroups.  Every language has its
  361.      good points and its bad points.  Some people love REXX, some
  362.      people hate it.  Use a language that suits your needs.
  363.  
  364.      (Editorial digression:  Programming languages are like
  365.      sexual positions -- some are more exciting than others, some
  366.      are more difficult, some are unusual, few have tried them
  367.      all, and everyone has a favorite.)
  368.      
  369.      -----------------------------------------------------------
  370.      2. Why does my OS/2 REXX program run more quickly the second
  371.      time?
  372.  
  373.      When you run a REXX CMD file for the first time, a tokenized
  374.      version will be stored on disk using the OS/2 extended file
  375.      attributes.  (You can see how big the tokenized version is
  376.      by using the /N option on the DIR command.)  If a tokenized
  377.      version exists AND the file has not been modified, CMD.EXE
  378.      will use the tokenized version instead of parsing the
  379.      source.
  380.  
  381.      Note that there is a 64K limit on the size of an extended
  382.      attribute entry, so very large REXX programs do not benefit
  383.      from this automatic tokenization.
  384.      
  385.