[comp.sys.amiga] SuperBasePro & Arexx

Steven.Ayscue@samba.acs.unc.edu (BBS Account) (08/23/90)

I have worked a bit with Superbase Pro (Version 3.01) and Arexx. What
I was doing was having Superbase Pro launch an Arexx script to run
DigiView to grab an image and then save the image, where another
script controled DigiPaint 3 to cut the image up and make a mosaic
after six digitizations. The mosaic pic was then given a name that
corresponded to the contents of a field in my database. (The whole
thing was an excersise with my son's yearbook.) What I was unable
to do was have Arexx accually CONTROL Superbase, that is, perform
actions such as those in the menues. 
 
I also found out a little too late about the $$$ support agreement,
but Precision (makers of Superbase) told me that they have a 
support area on Plink (telecom service) that is at no charge (other
than the service itself). If anyone has found some ways to control
Superbase from an Arexx script, please post some details....) One 
way to do it would be with Scripit, but I was hoping for the "RIGHT
WAY" through Arexx....
 
Steven.Ayscue@bbs.acs.unc.edu
Voice (919-477-1067)
 

mcmahan@netcom.UUCP (Dave Mc Mahan) (08/24/90)

 In a previous article, Steven.Ayscue@samba.acs.unc.edu (BBS Account) writes:
>I have worked a bit with Superbase Pro (Version 3.01) and Arexx. What
>I was doing was having Superbase Pro launch an Arexx script to run
>DigiView to grab an image and then save the image, where another
>script controled DigiPaint 3 to cut the image up and make a mosaic
>after six digitizations. The mosaic pic was then given a name that
>corresponded to the contents of a field in my database.  What I was unable
>to do was have Arexx accually CONTROL Superbase, that is, perform
>actions such as those in the menues. 

I have SuperBasePro version 3.01.  I don't have Arexx, but have it described
a little in the SBPro manual.  On page 15-27, it describes the CALL function
that you need to use to help with the Arexx interface.  Basically, I think you
have to add ARexx support through use of the DML programming language.  There
is no interface to ARexx via the pulldown menus.  You have to pass Superbase
strings that it parses via the DML, which in turn executes the desired action
and provides the desired data.  Kind of yucky, but I guess there really isn't
any other way to do it easily.


Later on, in appendix L of Volume 1, it states that:

"The Arexx interface is achieved by two extensions to the syntax of the CALL
 command:

1. CALL port EXECUTE strexpr
2. CALL port RETURN strexpr [TO] field/strvar

strexpr must be a string expression consisting of commands intelligible to the
receiving application, maximum length 255 characters.  Normally this is
equivalent to a stream of characters typed to the keyboard.  Superplan is
designed to respond to ARexx requests, and therefore can serve as a powerful
programmable spreadsheet extension to Superbase itself.

The first command extension is intended to allow other processes to execute
command strings passed from within Superbase.  port must be a string expression
which names an ARexx port belonging to another application.  The Superbase
ARexx port is called SBPRO.  The Superplan ARexx port is called SpRexx.  The
default ARexx port is REXX.  Note that ARexx is case sensitive.

The RETURN parameter allows the other application to return results to
Superbase in the specified field or string variable.  For example,

    CALL "SpRexx" RETURN "c23" TO a$

would store the contents of Superplan's cell c23 in a$.

   CALL "REXX" RETURN "test" TO a$

would attempt to run the ARexx program "test.rexx" and return its exit code
in a$.


 ERROR HANDLING

If ARexx is unable to complete the requested operation, its error value will
be passed back to Superbase and stored in the ERRNO operand.  The DML
program is responsible for checking ERRNO before and after the ARexx
CALL to see whether the action was successful.

If ARexx makes a request to the Superbase ARexx port SBPRO when
Superbase is busy processing, the value -1 will be returned to the ARexx
program or calling application.  However, an ARexx program called from
within Superase can send results back to Superbase by, for example, setting
Superbase variables.  Superbase will not return from the call command until
the ARexx process has terminated.  To determine the exit code of an ARexx
program, use the second syntax variant, which returns the exit code to your
named variable when it terminates."


>I also found out a little too late about the $$$ support agreement,
>but Precision (makers of Superbase) told me that they have a 
>support area on Plink (telecom service) that is at no charge (other
>than the service itself).

I find that the best way to get the maximum benefit from any type of
registration is to delay sending in the warranty card until you have a
serious question or want the free upgrade.  I still have yet to send in
my Superbase registration although I have had the program about 8 months now.
I use it to autodial the phone (via my modem) to easily implement a calling
list for a social group I belong to.  It works quite well, once I got used
to using the DML.

 
>Steven.Ayscue@bbs.acs.unc.edu
>Voice (919-477-1067)
 

     -dave