home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / vms / 14555 < prev    next >
Encoding:
Internet Message Format  |  1992-09-03  |  1.4 KB

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