Previous Thread
Next Thread
Print Thread
Runing programs in same session #11599 18 Jul 01 05:22 AM
Joined: Jun 2001
Posts: 3,376
J
Jorge Tavares - UmZero Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 3,376
Hi Jack,
Is it possible to run more than one program in the same a-shell session ?
Instead of open another window with XCALL AMOS,"run program" is it possible that the called program runs in the same window of the caller program ?
In AMOS, there was a command XCALL SYSTEM (we've discovered it in a tape from AMUS) that allow this.
Is it any command avalilable to do this ?

Thanks.


Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: Runing programs in same session #11600 18 Jul 01 08:55 AM
Joined: Jun 2001
Posts: 713
S
Steven Shatz Online Content
Member
Online Content
Member
S
Joined: Jun 2001
Posts: 713
I believe what you are looking for can be accomplished by adding the statement "OPTIONS=AMOS_RUNSBR" to your miame.ini file. Then when you invoke AMOS.SBR to RUN (or ORUN) a program under Unix or Linux, the program will run in the current window. See pages 64 and 158 of the A-Shell Users Guide.

Re: Runing programs in same session #11601 18 Jul 01 09:00 AM
Joined: Jun 2001
Posts: 11,650
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,650
XCALL HOSTEX always creates a new process. (Under A-Shell/Windows, the new process has its own window, while under A-Shell/Linux, it takes over the current screen.)

XCALL AMOS, on the other hand, (which is much closer to the SYSTEM.SBR and/or AMOS.SBR you may have seen under AMOS) may or may not create a new process & window, depending on the following rules:

1. If the command passed to XCALL AMOS starts with LOG, SET, LOOK, or VUE then it is handled as a true subroutine within the current process/window.

2. Else if the AMOS_RUNSBR option is set (either via OPTIONS=AMOS_RUNSBR in MIAME.INI, or by using .SET AMOSRUNSBR), and the command starts with RUN, ORUN, or the name of any LIT command in SYS: (other than DO/MDO) then it is still handled as a true subroutine within the current process/window.

3. Otherwise, a new process/window is created to execute the command.

If you search UPDATE.TXT for "RUNSBR" you will find several notes about it.

Note that although OPTIONS=AMOS_RUNSBR is not set by default (for historical compatibility reasons), we do recommend that you set it, since executing such commands within the current process/window is not only faster but more closely simulates what happens under AMOS.

Also note that if you are using OPTIONS=AMOS_RUNSBR, but in certain circumstances you want to force it to launch a new window to execute a background task, you should use XCALL HOSTEX,"$ASHELL &" will always create a new process/window and let it run independently of your current window.


Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3