Operating System - OpenVMS
1751871 Members
5362 Online
108782 Solutions
New Discussion юеВ

Re: how to submit a daily job?

 
SOLVED
Go to solution
Robert_Boyd
Respected Contributor

Re: how to submit a daily job?

Due to the problems with the queue manager using the file id to track a file that has been queued for batch, I find it more reliable to use a "resubmitter" procedure as a front end to the actual procedures that need to be run at regularly scheduled intervals. That way when you have a job fire up to run, it actually runs the most recent version rather than the last one submitted.

Another way that I've deal with this in some of my DCL code is to have the very beginning of the procedure check to see if there is a more recent version of itself and recurse to that version.

I'm attaching an example procedure that illustrates the recursion method.

Robert

Master you were right about 1 thing -- the negotiations were SHORT!
Robert_Boyd
Respected Contributor

Re: how to submit a daily job?

Here's an example of a resubmitter procedure that serves as a front end to any procedure that needs to be run regularly.

Robert
Master you were right about 1 thing -- the negotiations were SHORT!
Robert_Boyd
Respected Contributor

Re: how to submit a daily job?

I just noticed that my RESUBMIT.COM refers to a procedure FINDJOB.

I'm attaching a copy of FINDJOB here in case anybody's interested in actually making the RESUBMIT work.

Robert
Master you were right about 1 thing -- the negotiations were SHORT!
Sheldon Smith
HPE Pro

Re: how to submit a daily job?

And, for what it's worth,

$ procedure_file = f$environment("procedure")
$ procedure = f$element(0,";",procedure_file)
$ submit/after="tomorrow+0-08:00:00" 'procedure'

can be reduced down to (the single line)

$ submit/after="tomorrow+0-08:00:00" 'f$element(0,";",f$environment("procedure"))'

As said, make it the first line of your procedure.

Note: While I am an HPE Employee, all of my comments (whether noted or not), are my own and are not any official representation of the company

Accept or Kudo

Davor_7
Regular Advisor

Re: how to submit a daily job?

Thanks all~!
i'll try the easiest way later :)
Sebastian Bazley
Regular Advisor

Re: how to submit a daily job?

Robert Boyd points out that the queue manager stores the command file name by FID.

If you create a new version of the file, and purge the old one before the job has run, queue manager won't find it. Even if the file is renamed to the same version it won't be found.

This has implications for batch scripts that are part of installation kits.

The work-round we used was to create a very simple script that takes its parameters and passes them to the real command file. This is created once if necessary, and never changed.
Karl Rohwedder
Honored Contributor

Re: how to submit a daily job?

Just to add, there is a CRON port for VMS (dated 1991) from a guy called Lance Baily, with some mods from H. Teutsch and myself.

We use it heavily on VAX/Alpha, it is cluster aware. It checks for the crontab entries and starts the jobs using batch.

I do not know, if can be found on the web, but if someone is interested I can make it available.

regards Kalle
Vladimir Fabecic
Honored Contributor

Re: how to submit a daily job?

Karl,
please make it available.
In vino veritas, in VMS cluster
Davor_7
Regular Advisor

Re: how to submit a daily job?

thanks all

btw, Karl
pls let it available :)
Ian Miller.
Honored Contributor

Re: how to submit a daily job?

Karl, if you talk to Hunter Goatley he will host your version of cron.
____________________
Purely Personal Opinion