Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

batch job submit another batch job

 
SOLVED
Go to solution
Kong Yin
Occasional Visitor

batch job submit another batch job

I have a batch process which creates a temporary command procedure file. It creates the command procedure file sucessfully, but when it attempts to submit it, the file cannot be submitted from the batch process. What privilege did the batch process is missing?
11 REPLIES 11
Steven Schweda
Honored Contributor

Re: batch job submit another batch job

> [...] the file cannot be submitted from the
> batch process.

What, exactly, does this mean? As usual, it
can be helpful to show actual commands and
actual error messages instead of vague
descriptions and interpretations.
Jon Pinkley
Honored Contributor

Re: batch job submit another batch job

Kong Yin,

Generally non-prived users can submit to queues that the user has submit access to, as long as qualifiers like /user=otheruser /priority=higher are not used. However, it is possible that the process has been setup with no batch access. See output from the AUTHORIZE utility, under access

UAF> SHOW /FULL

What error message are you getting? What command did you use to attempt to submit the file?

What do the following show?

$ show process/priv
$ show symbol submit

Please provide more info for better answers.

It is also possible that the SUBMIT verb has been removed from DCL tables, or that there is a DCL symbol submit has is redefining the command. In other words, there are many "possible" reasons why it does not work, but you haven't given us much info to determine the real cause.

Jon
it depends
Jon Pinkley
Honored Contributor

Re: batch job submit another batch job

Also provide the output from:

$ show queue/full ! the queue you are submitting to.

And do read the help for submit.

$ help submit

Jon
it depends
Jon Pinkley
Honored Contributor

Re: batch job submit another batch job

When you submit the batch job that attempts to submit a batch job, make sure to specify a log file and /keep (no /noprint) so the log file will stay around.

In the command file that is running in batch context, make sure you have verification turned on, for example at the top of the command file

$ ver = 'f$verify(1)'

at the end

$ exit 1+0*f$verify(ver)

The 1 in the previous line will be the exit status, you may want it to be something set by what really happened in the command procedure, but that is out of scope of this question.

For a batch job the last part isn't necessary, because the process will disappear, but it the command file is ever going to be used interactively, it is good practice to leave the DCL state the way it was when you entered the process. A pet peave of mine are command files that disable control-y and don't restore to the previous state on exit.

Jon
it depends
Jan van den Ende
Honored Contributor

Re: batch job submit another batch job

Yin,

To begin with:

WELCOME to the VMS forum!

To summarize the previous answers:

- WHAT was the LITERAL command that "failed"

- WHAT was the literal failure message (or WAS there none, and dis the job "only" fail when trying to execute?)
- the output of
$ SHOW QUEUE SYS$BATCH /FULL
(in the not-unlilely evnet of another target queue, add the name of that queue)

Put the output in a plain-text file (in MS terminology: a NOTEPAD file); check or rename to a .TXT file type; and attach to your post.

From that info, probably the course to take can be derived.

hth

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Kong Yin
Occasional Visitor

Re: batch job submit another batch job

I have a batch process sitting on a queue, listening from ORACLE PIPE information, based on the information collected, write a temporary command procedure. Then submit the temporary procedure file to execute as another batch job. I can see the temporary file was created, but it did not get submitted. The submit command I used inside the parent batch process is

$ SUBMIT/NAME=OTHER_JOB/NOIDENTIFY /DELETE /LOG_FILE=OTHER_JOB.LOG/NOTIFY /KEEP /NOPRINT
/PRIORITY=100 TEMPORARY.COM

If the temporary procedure is submitted, it should delete itself after execution. But the file was there, but it never got submitted and executed. And I did not see any log file was created.
Hein van den Heuvel
Honored Contributor

Re: batch job submit another batch job

First, why not start by changing the /NOIDENTI to /IDENTI to 'see' the submit in action.

Second, the command does nto specify a QUEUE NAME, so it default to SYS$BATCH. Is that reasonable?

What is $STATUS after the submit?

You may want to fetch the current queue first using something along the lines of:

f$getqui("DISPLAY_QUEUE","QUEUE_NAME","*","THIS_JOB")


Finally use ACCOUNTING /FULL / BEFOR=x /SINCE=y
X and Y should be fairly close aroudn the test time.
Also check out the /JOB and /TYPE options.


hth,
Hein.
Hoff
Honored Contributor
Solution

Re: batch job submit another batch job

There's no magical answer.

There's no OpenVMS answer.

There is only "trace the DCL in your environment and find out what happened" answer.

This tracing can involve SET VERIFY or f$verify. This can involve checking the queue to see if the job was blocked from execution by the queue being paused or stopped, or by another long-running job or otherwise.

You're left to do your due diligence here; why this job didn't run is entirely system-specific. And only you can determine why the job didn't run.
labadie_1
Honored Contributor

Re: batch job submit another batch job

The accounting command may help, just after a submit that failed (at 15:31, for example), issue a
$ acc/fu/since=15:31/before=15:40
and look at the "final status text"

By the way, check that the accounting is enabled,
$ show acc
should show something similar to
$ sh acc
Accounting is currently enabled to log the following activities:

PROCESS any process termination
INTERACTIVE interactive job termination
LOGIN_FAILURE login failures
SUBPROCESS subprocess termination
DETACHED detached job termination
BATCH batch job termination
NETWORK network job termination
PRINT all print jobs
MESSAGE user messages
$
Kong Yin
Occasional Visitor

Re: batch job submit another batch job

Thanks for your all suggestion, I finally be able to trace it down line by line at the parent process, which has a logical error pointed to a wrong device. I fixed it and it works now. Thanks!
Steve Reece_3
Trusted Contributor

Re: batch job submit another batch job

As Hoff commented, this is entirely system specific and something that nobody else could have pointed their finger at.

What's often easiest to start with in this kind of situation is to establish that the temporary command procedure actually gets created (so comment out the DELETE within whichever command procedure it's in so that the temporary file hangs around.)

If nothing magical happens (which it doesn't because this isn't Windows!) then there is generally a logical explanation!

Steve