* VAX Basic Help
[not found] <1995Jun12.215102.3083@mec.ohio.gov>
@ 1995-06-12 4:00 ` duncan
1995-06-14 4:00 ` Steve Lionel
1995-06-15 4:00 ` Hein RMS van den Heuvel
0 siblings, 2 replies; 3+ messages in thread
From: duncan @ 1995-06-12 4:00 UTC (permalink / raw)
Here is a question for someone who has programed in VAX BASIC before. Is there
anyway to execute DCL commands from inside of a basic program? What I want
to do is to create a menu in basic and have users execute DCL commands.
Any help would be appreciated.
*******************************************************************************
* Dayna Duncan Metropolitan Educational Council *
* Internet & Library Data Center *
* Services Coordinator 1300 Dublin Road *
* Email: Duncan@Mec.Ohio.Gov Columbus, Ohio 43215 *
*******************************************************************************
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: VAX Basic Help
1995-06-12 4:00 ` VAX Basic Help duncan
@ 1995-06-14 4:00 ` Steve Lionel
1995-06-15 4:00 ` Hein RMS van den Heuvel
1 sibling, 0 replies; 3+ messages in thread
From: Steve Lionel @ 1995-06-14 4:00 UTC (permalink / raw)
In article <1995Jun12.215309.3086@mec.ohio.gov>, duncan@mec.ohio.gov writes:
|>Here is a question for someone who has programed in VAX BASIC before. Is there
|>anyway to execute DCL commands from inside of a basic program? What I want
|>to do is to create a menu in basic and have users execute DCL commands.
Yes - use the OpenVMS Run-Time Library routine LIB$SPAWN. It will allow you
to execute a DCL command you supply as a string argument. See the Run-Time
Library (LIB$) manual for further details.
--
Steve Lionel Mail: lionel@quark.enet.dec.com
DEC Fortran Development WWW: http://www.digital.com/info/slionel.html
Digital Equipment Corporation CompuServe: 75263,3001
110 Spit Brook Road, ZKO2-3/N30
Nashua, NH 03062-2698 "Free advice is worth every cent"
For a summary of Digital's Internet services, send mail to info@digital.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: VAX Basic Help
1995-06-12 4:00 ` VAX Basic Help duncan
1995-06-14 4:00 ` Steve Lionel
@ 1995-06-15 4:00 ` Hein RMS van den Heuvel
1 sibling, 0 replies; 3+ messages in thread
From: Hein RMS van den Heuvel @ 1995-06-15 4:00 UTC (permalink / raw)
In article <1995Jun12.215309.3086@mec.ohio.gov>, duncan@mec.ohio.gov writes...
>Here is a question for someone who has programed in VAX BASIC before. Is there
>anyway to execute DCL commands from inside of a basic program? What I want
>to do is to create a menu in basic and have users execute DCL commands.
The easiest method is to call LIB$SPAWN. This can easily be done
from any VMS programming language, including BASIC.
It is a little expensive in that it creates a second process to do
the work and the main process is still sitting there 'hogging'
memory untill the sub process is done.
To use a single process, check out LIB$DO_COMMAND, but this reliquishes
control to the next image, stopping the menu image. That next image then
has the responability to chain back to the menu driver. Which then has
to re-open its files and so on, not 'cheap' either.
VAX BASIC makes LIB$DO_COMMAND easy through the CHAIN command.
You might want to enure going back to the menu for unexpected
menu endings by running the menu in a loop from a little command file.
$ON ERROR... <fill in>
$loop_to_menu = 1
$loop:
$RUN MENU
$IF loop_to_menu THEN goto loop ! Set to false by menu when done
$<fill in clean up action>
If excursions from menu to target programs become relatively frequent
(more then once every 10 seconds?) then you may want to keep the spawned
subprocess alive and feed it new commands through a mail box, or more
closely integrate target programs and menu (calling routines in (shareable)
libraries, or relocating some menu actions to the programs.
For real serious implementations, expecting many (hundreds) of users selecting
from dozens of tasks you may want to examine heavy duty solutions such
as Digital's ALL-IN-1 or ACMS or somesuch.
$BASIC
Help chain
CHAIN
The CHAIN statement transfers control from the current program to another
VAX BASIC program. The program to recieve control must be in executable
format.
Hope this helps, +--------------------------------------+
Hein van den Heuvel, Digital. | All opinions expressed are mine, and |
"Makers of VMS and other | may not reflect those of my employer |
fine Operating Systems." +--------------------------------------+
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1995-06-15 4:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1995Jun12.215102.3083@mec.ohio.gov>
1995-06-12 4:00 ` VAX Basic Help duncan
1995-06-14 4:00 ` Steve Lionel
1995-06-15 4:00 ` Hein RMS van den Heuvel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox