REXX FOR UNICOS

James Crotinger jac at muslix.llnl.gov
Wed Aug 16 10:50:33 AEST 1989


In article <14019 at lanl.gov> dph at lanl.gov (David Huelsbeck) writes:
>COSMOS is mighty primative as CTSS command languages go.  At Los Alamos it
>was largely replaced (for new development anyway) by CCL which has subsequently
>been replaced by FCL.  FCL is the best command languages I've worked with yet.
>It makes the Unix shells look sort of pitiful; it makes COSMOS look pitiful 
>too.  Why don't you folks have more up to date CTSS command languages?
>

  Interesting. I'll have to find out about this. 

>I must admit that I'm not familiar with REXX.  However if it's anything
>like its predecessors EXEC and EXEC II all I can say is YUCK. 
>

  REXX is an interpretive language (well, there are some compilers on 
IBM mainframes) that has an excellent set of string parsing/handling functions
coupled with a very easy to use method for interprocess communication.
A controllee must open a REXX communication port and register it with
the REXX server. Once registered, REXX programs can send messages and
receive results from the controllee. For instance, suppose we had a
controllee with a REXX port named FOO. To send a string to that controllee
you'd just say:

address FOO message

A REXX program always has an active "host". It can switch hosts with
the "address" command. Any statement which is not understood by the
REXX interpreter is passed to the controllee. (It can be quoted if
the message would otherwise be interpreted as a valid REXX statement).
Thus:

address FOO
message1
message2
...

If you need to get a result from FOO, it is returned in a variable
named RESULT (or result..REXX is not case sensitive)..

address FOO
status
foos_status = RESULT

would, say, return a status string to the variable foos_status, which could
then be parsed, and based on that info, a message might be sent to another
controllee:

/* parse foos_status, etc. */`
address BAR message_to_bar

You get the idea. AREXX (Amiga REXX) has a very power feature that I
believe is an extension of the language (certainly it is not in Cowlishaw's
book) called a direct variable interface. This allows a host program to
return results directly to a REXX stem variable (REXX supports associative
arrays, called stem variables). Thus you might say

address FOO
getstatus mystatus
 
Then mystatus.cpuseconds, mystatus.size.height, mystatus.size.width, etc.,
would contain various fields describing the status of the system.
(I have an AREXX compatible database that does this, and I find it to
be an extremely powerful combination!)

Thus REXX is, IMHO, a very good batch language for writing macros to run
controllees, and for integrating multiple controllees. REXX was specifically
designed to be easy to learn and used. It it typeless (everything is a 
string, though there are numerical operators which work on strings which
contain numbers), interpreted, and the standard implementation has several
modes to allow interactive debugging. 

>
>> Jerry Berkman
>> U.C. Berkeley
>
>Of course these are only the opinions of lowly hacker.  For official possitions
>you'll have to talk to somebody much higher up.
>
>-dph

  Jim Crotinger
  Lawrence Livermore National Laboratory



More information about the Comp.unix.cray mailing list