Operating System - OpenVMS
1755945 Members
4367 Online
108839 Solutions
New Discussion юеВ

submit DCL command question

 
Phillip Tusa
Advisor

submit DCL command question

Greetings to all ...

I am trying to use the submit command to execute a command procedure once a week on Monday at 3:00 AM.

I am not familiar with the submit command but from what I have read it should look something like this:

$ submit /noprinter/notify/after= ???? -
DSA20:[MDTSYS.COM]do_some_process.com

Any help would be appreciated!

Thanks!

--
Phil
"I'd rather be a VMS guy, any day of the week!"
2 REPLIES 2
Wim Van den Wyngaert
Honored Contributor

Re: submit DCL command question

http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=1232913

(close the other version of this question please)

Wim
Wim
Hein van den Heuvel
Honored Contributor

Re: submit DCL command question

As Wim points out, this and many much similar questions has been asked and answerred before. Please 'google'.


Still, here is a specific, fun, 2-line solution:

$ days = f$loc(f$ext(0,2,f$cvt(0,,"weekday")),"xxSuSaFrThWeTuMo")/2
$ submit / after = "03:00 +''days'-" x.com

It grabs the leading two characters from the weekday and locates those in a reverse list of (English) week day abbreviations.
The position found, divided by 2 is the number of days untill the nex Monday.

Submit after 03:00 plus those days.

Note, this of course fails to submit 'that day' if run Monday 00:00 - 03:00

Enjoy!
Hein.