home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!wupost!waikato.ac.nz!comp.vuw.ac.nz!zl2tnm!toyunix!don
- Newsgroups: comp.os.vms
- Subject: Re: Submitting Jobs for Last Day of Month
- Message-ID: <9258246@zl2tnm.gen.nz>
- From: don@zl2tnm.gen.nz (Don Stokes)
- Date: 3 Sep 92 08:25:08 GMT
- Sender: news@zl2tnm.gen.nz (GNEWS Version 2.0 news poster.)
- Distribution: world
- Organization: The Wolery
- Lines: 26
-
- don@zl2tnm.gen.nz (Don Stokes) writes:
- >$ submit file.com/after="1-''f$extract(2,8,f$cvtime("1-+31-","ABSOLUTE"))':0:5"
-
- Sigh. I didn't think I was _that_ tired. Joe Meadows seems to be the only
- one who noticed that the subject said "last" day of month and my code gets
- the first. 8-( Thanks Joe.
-
-
- OK, so lets try for a slick way to get the last day of this month:
-
- $ submit file.com/after="1''f$extract(1,14,f$cvtime("1-+31-","ABSOLUTE"))'5-1-"
-
- Change the "31" to "62" to get the last day of next month (for when the
- batch job comes to resubmit itself).
-
- To just get the date into a symbol:
-
- $ eom=f$cvtime("1''f$extract(1,9,f$cvtime("1-+31-","ABSOLUTE"))'-1-",ABSOLUTE")
-
- Same comments apply as for the first of the month code -- no pathological
- cases, no truncated lexicals etc. So where's my chocolate fish? 8-)
-
- --
- Don Stokes, ZL2TNM (DS555) don@zl2tnm.gen.nz (home)
- Network Manager, Computing Services Centre don@vuw.ac.nz (work)
- Victoria University of Wellington, New Zealand +64-4-495-5052
-