- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Submiting a batch job to run automatically twi...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2008 05:27 AM
тАО03-27-2008 05:27 AM
Ex. April 30th, August 31st and December 31st
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2008 05:42 AM
тАО03-27-2008 05:42 AM
Solution$ MONTHS = "//FEB/MAR/APR/MAY/JUN/JUL/AUG/SEP/OCT/NOV/DEC/JAN"
$ YEAR = 'F$CVT(,,"YEAR")
$ MONTH= 'F$CVT(,,"MONTH")'
$ IF MONTH .EQ. 12 THEN YEAR = YEAR + 1
$ MONTH = F$ELEMENT(MONTH+3, "/", MONTHS)
$ SUBMIT/AFTER=1-'MONTH'-'YEAR' 'f$env("procedure")
submits for the first day every 3 months.
I search for a trick to find the last day of month easily, but I guess others will have posted in the meantime...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2008 06:00 AM
тАО03-27-2008 06:00 AM
Re: Submiting a batch job to run automatically twice a year
day, but only _do_ something on particular
days.
> [...] automatically twice a year
> [...] every quarter [...]
Around here, "every quarter" would involve
more than "twice a year". (And perhaps once
between April and August.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2008 06:26 AM
тАО03-27-2008 06:26 AM
Re: Submiting a batch job to run automatically twice a year
$ Temp = F$CVTIME("01"+(Temp-F$ELEMENT(0,"-",Temp))+"+125-","ABSOLUTE")
$ Last3 = F$CVTIME("01"+(Temp-F$ELEMENT(0,"-",Temp))+"-1-",-
"ABSOLUTE","DATE")
$ submit /after='last3 'f$env("procedure")
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2008 06:32 AM
тАО03-27-2008 06:32 AM
Re: Submiting a batch job to run automatically twice a year
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2008 06:55 AM
тАО03-27-2008 06:55 AM
Re: Submiting a batch job to run automatically twice a year
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2008 06:55 AM
тАО03-27-2008 06:55 AM
Re: Submiting a batch job to run automatically twice a year
In 2004 I posted this to dcl.openvms.org:
http://dcl.openvms.org/stories.php?story=04/10/15/8590853
A procedure that lets you specify all kinds of variables for calculating next submit.
eg: Last sunday of every month, or (your latest question) first Friday after 8th of month where month # a certain multiple.
This procedure contains a fairly extended "manual" in its comments.
hth
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2008 06:57 AM
тАО03-27-2008 06:57 AM
Re: Submiting a batch job to run automatically twice a year
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2008 07:36 AM
тАО03-27-2008 07:36 AM
Re: Submiting a batch job to run automatically twice a year
April, August, and December is three times a year, neither two nor four!
That said, the approach of adding to the current month will work. You can use the F$CVTIME lexical function within the DCL procedure to extract the current month from the current time (which can be obtained using F$TIME).
The "second Friday" part is trickier. If I were doing the computation, I would likely get the weekday (also available using F$CVTIME) for the 1st of the month and then compute the adjustment, or I could compute the day of the week for the 13th (the earliest date within a month that can be the second Friday), and adjust accordingly.
Note that F$CVTIME when used in "COMPARISON" mode returns numeric values, which are easier to process in this situation.
One should also take care in the event that the procedure is run at some other time that the calculations do not misfire.
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2008 07:50 AM
тАО03-27-2008 07:50 AM
Re: Submiting a batch job to run automatically twice a year
>>>
for the 13th (the earliest date within a month that can be the second Friday),
<<<
In MY book, when the 1st of any month is a Friday, that month the 8th is counted as the second Friday... :-)
Proost.
Have one on me.
jpe