SYSTEMRUN [ HP Business BASIC/XL Reference Manual ] MPE/iX 5.0 Documentation
HP Business BASIC/XL Reference Manual
SYSTEMRUN
The SYSTEMRUN statement runs another program from HP Business BASIC/XL.
The new program can be any program that the operating system can run or.
HP Business BASIC/XL is suspended until the new program finishes, unless
otherwise specified. This statement is primarily available for MPE/V
compatibility; on MPE XL, the SYSTEM statement also can run other
programs.
Syntax
As a statement or command:
[{,} ]
SYSTEMRUN str_expr [{;} STATUS [=] num_var]
As a command only:
{str_lit }
:RUN {unquoted_str_lit}
Parameters
str_expr The run string that the operating system recognizes for
any program (HP Business BASIC/XL or not). For the
syntax of this run string, see the appropriate operating
system manual or type
:HELP RUN
.
The following parameters can be added to the operating
system run string (run string parameters are separated
by semicolons):
NOSUSP HP Business BASIC/XL is not suspended.
PRI= Priority of new program. This is one
of: BS, CS, DS, or ES. BS is highest;
ES is lowest. If the specified
priority exceeds the highest priority
that the system permits for the log-on
account, then the priority is the
highest possible below BS. The default
priority is HP Business BASIC/XL's
priority.
num_var Returns job control word (JCW) of called process.
For more information about these parameters, see the MPE XL INTRINSICS
Reference Manual or type
:HELP RUN
Examples
100 SYSTEMRUN "Prog1"
200 SYSTEMRUN "Prog2;MAXDATA=31000"
300 SYSTEMRUN "Prog3;MAXDATA=20000;INFO=""Text3"""
400 SYSTEMRUN "Prog4;NOSUSP"; STATUS=S
500 SYSTEMRUN "Prog5;NOSUSP;PRI=DS", STATUS=S
600 SYSTEMRUN "Prog6;MAXDATA=10000;NOSUSP;PRI=DS",STATUS S
700 SYSTEMRUN "Prog7;NMSTACK=395000;XL=""XL.pub.tools,lib7.diag.sys"""
800 SYSTEMRUN Progname$+Run_options$+";unsat=debug"
You can execute a program on another terminal if that terminal is not in
use (that is, no one is logged on). HP Business BASIC/XL requires
additional settings beyond those which MPE XL requires in order for such
programs to execute correctly.
To use a remote terminal, the specific device must be given a name with a
file equation. To use HP Business BASIC/XL programs (or the interpreter)
on that terminal, use a file equation similar to the following:
FILE <name>,NEW;DEV=<ldev>,ACC=INOUT;REC=-500;CCTL
You must specify the logical device number of the terminal, and the name
must be a legal file name. If the access used is not INOUT, the system
console will ask if the device can be used; this will then require an
operator response.
The record size and CCTL specifications are for HP Business BASIC/XL. If
these are not specified, neither input nor output can be guaranteed to be
correct. If a record size of less than 500 bytes is used, any type of
input, or a READ statement may cause the program to abort.
In order to run a program on another terminal, redirect $STDLIST and
$STDIN to the equated file name.
10 SYSTEM "file term,new;dev=55;acc=inout;rec=-500;cctl"
20 SYSTEMRUN "myprog;stdlist=*term;stdin=*term"
30 SYSTEMRUN "myprog;stdlist=*term;stdin=*term;nosusp"
Line 20 will run the program MYPROG on the terminal whose logical device
number is 55. This program will run correctly, allowing forms and keys
to be used. The program above will wait for MYPROG to finish before
executing line 30.
Line 30 also runs the MYPROG program. In this case, the NOSUSP in the
systemrun command will allow the current program to continue without
waiting for MYPROG to finish. Both programs will continue to run at the
same time. However, NOSUSP can affect the handling of the HALT key (
CONTROL Y ).
MPE/iX 5.0 Documentation