Operating System - OpenVMS
1753971 Members
8185 Online
108811 Solutions
New Discussion юеВ

Re: Exiting Command Procedure

 
SOLVED
Go to solution
Jan van den Ende
Honored Contributor

Re: Exiting Command Procedure

Joe,

so it looks like the command procedure is being Chained.
The main charactaristic:

@comfile, which runs HIVAC, giving control to the comfile, which @comfile ... in the next level of nesting.
Several rounds of that, and you are too deeply nested.
This construct is definitely a programming error.
The true cure would be to modify HIVAC.EXE to give control to DCL by SPAWNing it (calling xxxSPAWNxxx in whatever syntax used by the language HIVAC is written in), and looping back to the functional starting point of the program after SPAWN returns.
Depending on the need to use settings of the current process, there MAY be a solution if you put
$ pcl @hivac:HIVAC
in a separate .COM file, and replace that line in your script by:
$ RUN SYS$SYSTEM:LOGINOUT /INPUT=
$ LOGOUT

This starts a new (top level) process, in which your PCL command gets executed, and then stops the current.
But: NO settings like logicals, symbols, whatever are transfered to the new process. If they are not needed, you are home safe, but if you need to feed some of them to the new process, it becomes a whole new ballgame!

Success.

Proost.

Have one on me.

j[e

Don't rust yours pelled jacker to fine doll missed aches.
Joseph Dellwo
Occasional Advisor

Re: Exiting Command Procedure

I do pass symbols back to a script file but I wanted to see how this works. I created implantjoe.com with my command and modified the original as you said and it just logs me out. It doesn't try to run the new com file. Show Process says 20E5BA1C is nonexistant.

$ END:
$ RUN SYS$SYSTEM:LOGINOUT /INPUT=implantjoe.com
%RUN-S-PROC_ID, identification of created process is 20E5BA1C
$ logout
ENG40 logged out at 2-DEC-2005 12:02:15.94
Arch_Muthiah
Honored Contributor

Re: Exiting Command Procedure

Joe,

could you please try my previous (posting)suggesions of removing $exit and adding $ pcl @hivac:HIVAC at the end each of your com procedure.


Archunan
Regards
Archie
Joseph Dellwo
Occasional Advisor

Re: Exiting Command Procedure

Sorry Archunan,
that's the way I've had it for a while. Anyway, several other similar commands are in the middle of my com file. Either way, no difference.

Thanks, Joe
Hein van den Heuvel
Honored Contributor

Re: Exiting Command Procedure


WAG:
I get the impression you just need to replace that last "pcl @hivac:HIVAC"
with a straight 'exit'.

Hein.
Arch_Muthiah
Honored Contributor

Re: Exiting Command Procedure

Joe,

My assumptions was that your "pcl script" is capable of handovering any COM procedure to VMS CLI, then it dies itself. So your COM procedure should again invoke this "pcl script" at the end before it exits out of VMS.

I found there is a $exit command before $END:
Because of this $exit, you are unable to execute "$pcl @hivac:HIVAC" and bring back promis menu.

Or when your other procedures finshes execution, it exits from the session, instead of invoking "$pcl @hivac:HIVAC".

As per my understanding your current COM procedure never executes "$pcl @hivac:HIVAC" to keep your promis session alive unless you choose 'X'option. The same thing happes when you pass other COM procedure also.

Joe, can you send any of your other COM procedure?, because I don't suspect your promis script, but no surprise it does not give DCL prompt to the user.

Archunan
Regards
Archie
Joseph Dellwo
Occasional Advisor

Re: Exiting Command Procedure

Archunan,
I'm afraid I don't quite follow you.
The "$pcl @hivac:HIVAC" and the other $pcl commands execute as I have planned in writing the procedure. If I hit X it goes to the END: label and runs the HIVAC script. I put the exit before that for good measure so if the procedure gets to the end of the ENTER: section it will exit before the END: label.

When I'm testing your suggestions I'm sending it straight to END: and it never sees the $exit you're worried about. As you can see in my last message it ran Loginout.

[Hein, if I just do a straight exit I'll just leave my users at a dcl prompt]

Anyway, don't waste anymore time on it. It does what I want, much better than the previous scripts. There's no real problem in usage. I just wanted to make it a little more elegant. Thanks for your help. I've learned a lot.

--joe