home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 2
/
goldfish_vol2_cd2.bin
/
bbs
/
gfx
/
megajitter-1.3.lha
/
MegaJitter
/
REXX
/
MSC
< prev
Wrap
Text File
|
1994-05-18
|
2KB
|
70 lines
/****************************************************************************
*
* MegaJitter SET SCENARIO (c) LVA 1994
* ----------------------- ------------
*
* This AREXX program takes the name of a MegaJitter SCENARIO file.
* These scenario files are actually also AREXX programs which address Mega-
* Jitter as a host and send them parameter change requests to configure an
* Ecosystem scenario; then they request a restart command.
*
* This file contains the common startup and error handling code.
*
****************************************************************************/
SAY 'MegaJitter SET SCENARIO V1.0 (c) LVA 1994'
SAY '-----------------------'
SAY
OPTIONS FAILAT 100000
SIGNAL ON ERROR
SIGNAL ON BREAK_C
ARG scenario /* command line requires a filename */
IF scenario = '' | scenario = '?' THEN DO
SAY "Usage: MSC <scenario> | ?"
SAY
IF scenario = '' THEN SAY "ERROR: no scenario file specified."
EXIT
END
IF ~EXISTS(scenario) THEN DO
SAY "ERROR: Scenario file" scenario "not found !"
EXIT
END
host_ok = SHOW("PORTS","REXX-MJ") /* is MegaJitter already running ? */
IF ~host_ok THEN DO
SAY "ERROR: MegaJitter is not running. Please start MegaJitter first."
EXIT
END
SAY "Setting new MegaJitter scenario:" scenario "..."
/* The next line goes off to execute the REXX sub-program (file) */
scenario
SAY "Done."
EXIT
/* ------------------------------------------------------------------------ */
ERROR:
say "An error was returned by MegaJitter (ERROR RC =" RC
say "check line #" SIGL
say "------------------------------------------------"
say sourceline(SIGL)
say "------------------------------------------------"
EXIT
/* ------------------------------------------------------------------------ */
BREAK_C:
SAY "^C *** PROGRAM ABORTED ***"
EXIT
/* ------------------------------------------------------------------------ */