Operating System - OpenVMS
1827705 Members
2893 Online
109967 Solutions
New Discussion

Re: Starting a detached process from the batch queue

 
Peter Elliott_3
Occasional Advisor

Starting a detached process from the batch queue

Hello

I'm trying to write a DCL command file which will restart a detached process if it has stopped. I want to use the batch queue so that the check can be performed periodically. When running from the batch queue my command file can detect that the target detached process is not running and can actually restart the process, however the process fails almost immediately. Any suggestions as to why is this happening?
14 REPLIES 14
Kris Clippeleyr
Honored Contributor

Re: Starting a detached process from the batch queue

Hi Peter,
Welcome to the VMS forum.

What's the error you're getting? Anything seen in the log file of the batch job?
Please gives us some more info.

Greetz,
Kris (aka Qkcl)
I'm gonna hit the highway like a battering ram on a silver-black phantom bike...
Peter Elliott_3
Occasional Advisor

Re: Starting a detached process from the batch queue

There are no error messages in the log file. I get notification that the process has started:
%RUN-S-PROC_ID,...
but the process disappears immediately.

If I perform the same command from the DCL prompt the process starts and continues as normal.
David B Sneddon
Honored Contributor

Re: Starting a detached process from the batch queue

Peter,

Can you provide the EXACT commands you are using when
it works and when it fails along with the EXACT errors
you get?

Dave
Kris Clippeleyr
Honored Contributor

Re: Starting a detached process from the batch queue

Peter,
You kick of a detached process by specifying either the /UIC or the /DETACHED qualifier is specified with the RUN command and you have the IMPERSONATE priv. You could change the RUN command and add the /OUTPUT=file and the /ERROR=file qualifiers, so that any conditions signalled by the created process are captured.
Greetz,
Kris (aka Qkcl)
I'm gonna hit the highway like a battering ram on a silver-black phantom bike...
Antoniov.
Honored Contributor

Re: Starting a detached process from the batch queue

Peter,
welcome to VMS forum.

Batch queue can run a detached process: there are no limitation about this feature. Like you I use batch command to check and restart some detached processes.
I guess, you forgot SET DEFAULT command or something like this. Don't forget, batch command may have different login environment.

Antonio Vigliotti
Antonio Maria Vigliotti
Peter Elliott_3
Occasional Advisor

Re: Starting a detached process from the batch queue

The command I am using
RUN/PROCESS=processname/DETACHED/OUTPUT=output.log process.exe

I have now included /error=error.log and get the following error:

%SYSTEM-F-ACCVIO, access violation, reason mask=04, ...

Perhaps this is more useful information?
Karl Rohwedder
Honored Contributor

Re: Starting a detached process from the batch queue

Check the accounting with the PID you get when the RUN command is executed.

$ ACCOUNT /FU/ID=... ACCOUNTNG

Check for the final status code/text.

regards Kalle
Robert_Boyd
Respected Contributor

Re: Starting a detached process from the batch queue

Peter,

One possibility is that the process is getting started with insufficient quotas and is running out of something leading to the ACCVIO.

You might try adding the /AUTHORIZE qualifier to the RUN to force it to be logged in with the quotas of the intended username.

And, if you still get the error message(s), please provide the complete text of the error.

Robert
Master you were right about 1 thing -- the negotiations were SHORT!
Peter Elliott_3
Occasional Advisor

Re: Starting a detached process from the batch queue

Adding AUTHORIZE did not help, so here is the error message in full:

SYSTEM-F-ACCVIO, access violation, reason mask=04, virtual address=0000FFFE, PC=00040C54, PS=0000001B
%TRACE-F-TRACEBACK, symbolic stack dump follows
Image Name Module Name Routine Name Line Number rel PC abs PC
RNGCLIN 0 00030C54 00040C54
0 85404170 85404170
Peter Elliott_3
Occasional Advisor

Re: Starting a detached process from the batch queue

OK maybe using /AUTHORIZE did help! The process is now being successfully restarted from the batch queue.

A big thankyou to all who contributed to solve my problem!
Antoniov.
Honored Contributor

Re: Starting a detached process from the batch queue

Peter,
are you sure in interactive mode, can your command works?
The difference between interactive mode and batch mode are:
1) SYLOGIN and LOGIN: statements submitted by F$MODE()
2) Rarely access restricion on SYSUAF

May be you have limited MAXDETACH in your SYSUAF, but this value is valid either in interactive either in batch mode.
I guess you have some limited quota.
Do you have process dump?

Antonio Vigliotti
Antonio Maria Vigliotti
Karl Rohwedder
Honored Contributor

Re: Starting a detached process from the batch queue

A little off topic about the differences between interactive- and batchmode:

Some DCL commands have different defaults for qualifiers depending on the mode, e.g. the lINK commands automagially adds a /MAP if run in batch, which leads to an error if you try to install VMSINSTALlable kits in batch, because VMSINSTAL sets default to MISSING:[MISSING], which makes the creation of a MAP-file quite difficult. There were some softwarekits I had to reassemble.

regards Kalle
Hein van den Heuvel
Honored Contributor

Re: Starting a detached process from the batch queue

Peter>> A big thankyou to all who contributed to solve my problem!

Welcome to the ITRC forum Peter.
Good to read your problem is addressed.

You can express you gratitude in measured steps by assigning points to answers.

You can gracefully indicate that you are no longer interested in further discussion on this topic by 'closing' it.

Regards,
Hein. (0 point for this comment please).

http://forums1.itrc.hp.com/service/forums/helptips.do?#28
Peter Elliott_3
Occasional Advisor

Re: Starting a detached process from the batch queue

Use of /AUTHORIZE in the RUN/DETACHED command solved the problem.
Once again, thanks to all who contributed to the forum.