home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!sun-barr!west.West.Sun.COM!cronkite.Central.Sun.COM!texsun!netdev!mic!montagar.com!ondec.lonestar.org!d_north
- From: d_north@ondec.lonestar.org (David G. North, CCP)
- Newsgroups: comp.os.vms
- Subject: Re: Submitting Jobs for Last Day of Month
- Message-ID: <1992Aug26.005630.99@ondec.lonestar.org>
- Date: 26 Aug 92 06:56:29 GMT
- References: <1992Aug25.102008.28397@jupiter.sun.csd.unb.ca>
- Organization: onDEC systems, Dallas, TX
- Lines: 29
-
- In article <1992Aug25.102008.28397@jupiter.sun.csd.unb.ca>,
- jmacdonald@mta.ca writes:
- > I am wondering if anyone has a nifty way to have jobs submit themselves
- > for the last day of the month. Thank-you.
- Ok... the problem is basically to figure out what the next EOM is, then do a
- submit/after etc. I've seen some interesting solutions, but I have yet to see
- one that's a straight 'expression' rather than having a requirement for some
- additional lexical component such as tables of months or what not. Following
- code is most likely not the easiest way to do it, but it is a straight
- expression.
- $ write sys$output "Next EOM is: ",-
- f$ele(0," ",f$cvtime(f$fao("+!UL-0",34-f$cvtime(,,-
- "day")-f$cvtime(f$fao("+!UL-0",34-f$cvtime(,,"day")),,-
- "day")),"absolute"))
-
- Following is the 'expanded' version of the above so it's a little clearer
- what's happening:
- $ _dom1 = f$cvtime(,,"day")
- $ _dom2 = f$cvtime(f$fao("+!UL-0",34-_dom1),,"day")
- $ write sys$output "Current day of month is: ''_dom1'"
- $ write sys$output "34 days past first of this month is day number ''_dom2' of next month"
- $ _neom = f$ele(0," ",f$cvtime(f$fao("+!UL-0",34-_dom1-_dom2),"absolute"))
- $ write sys$output "Next EOM is: ''_neom'"
- --
- David G. North, CCP
- d_north@ondec.lonestar.org {...!texsun!montagar!ondec!d_north}
- onDEC systems "Everyone's crazy but you & me...
- P.O.Box 795848, Dallas TX 75379-5848 and come to think about it, I'm
- (214)985-1316 ... (214)902-3957 not so sure about you either!"
-