merritt@iris613.gsfc.nasa.gov (John H Merritt) (06/02/89)
The following is obtained from the IBM's Virtual Machine System Product Introduction page of the "System Product Interpreter Reference", Release 3. -- Brief Description of the Restructured Extended Executor Language The Restructured Extended Executor (REXX) language is a language particularly suitable for: > Command procedures (EXEC's) > User defined XEDIT subcommands > Prototyping > Personal computing It is a general purpose, high-level language not unlike PL/I. REXX has the usual "structured programming" instructions -- IF, SELECT, DO, WHILE, LEAVE and so on -- and a number of useful built-in functions. No restrictions are imposed by the language on program format. There can more than one clause on a line or a single clause can occupy more than one line. Indentation is allowed. Programs can, therefore, be coded in a format that emphasizes their structure, making them easier to read. There is no limit to the length of the values of variables, so long as all variables will fit into the storage available. Symbols (variable names) are limited to a length of 250 characters. Compound symbols, such as NAME.X.Y (where X and Y can be the names of variables) may be used for constructing arrays and for other purposes. REXX programs normally have a filetype of EXEC; such files may contain CP and CMS commands. Similarly, REXX programs with a filetype of XEDIT may contain XEDIT subcommands. REXX programs are executed by an interpreter. That is, the program is executed line-by-line and word-by-word, without first being translated to another form (compiled). The advantage of this to the user is, that if the program fails with a syntax error of some kind, the point of failure is clearly indicated; usually, it will not take long to understand the difficulty and make a correction. -- What does all this mean? REXX is a high-level programming language similiar to the various shells found in UNIX. The interpreter works in, essentially, two steps: 1. Is the statement a REXX instruction? 2. If not, pass the string on to CMS (which can pass it onto CP, if necessary,) or XEDIT, or ISPF depending on which environment you currently have loaded. On Unix this environment, I guess, would be your favorite shell. Although, REXX lacks regular expressions and other powerful features found in Unix shells, it is simple to program and use. I am sure that many users would prefer to use it for most of their shell programming if it existed on Unix. I don't mean to say that it should replace the shell, but that the shell would invoke REXX. Merging REXX and a Unix shell would produce and extremely powerful user programming environment. On IBM: CMS or | XEDIT or +<-- REXX ISPF | On UNIX: csh or | sh or +<-- REXX tsh etc. | +----------------------------------+-----------------------------+ |John H. Merritt | Yesterday I knew nothing, | |Applied Research Corporation | Today I know that. | |merritt@iris613.gsfc.nasa.gov | | +----------------------------------+-----------------------------+