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

  1. 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
  2. From: d_north@ondec.lonestar.org (David G. North, CCP)
  3. Newsgroups: comp.os.vms
  4. Subject: Re: Submitting Jobs for Last Day of Month
  5. Message-ID: <1992Aug26.005630.99@ondec.lonestar.org>
  6. Date: 26 Aug 92 06:56:29 GMT
  7. References: <1992Aug25.102008.28397@jupiter.sun.csd.unb.ca>
  8. Organization: onDEC systems, Dallas, TX
  9. Lines: 29
  10.  
  11. In article <1992Aug25.102008.28397@jupiter.sun.csd.unb.ca>,
  12.   jmacdonald@mta.ca writes:
  13. > I am wondering if anyone has a nifty way to have jobs submit themselves
  14. > for the last day of the month.  Thank-you.
  15. Ok... the problem is basically to figure out what the next EOM is, then do a
  16. submit/after etc.  I've seen some interesting solutions, but I have yet to see
  17. one that's a straight 'expression' rather than having a requirement for some
  18. additional lexical component such as tables of months or what not.  Following
  19. code is most likely not the easiest way to do it, but it is a straight
  20. expression.
  21. $ write sys$output "Next EOM is: ",-
  22.           f$ele(0," ",f$cvtime(f$fao("+!UL-0",34-f$cvtime(,,-
  23.           "day")-f$cvtime(f$fao("+!UL-0",34-f$cvtime(,,"day")),,-
  24.           "day")),"absolute"))
  25.  
  26. Following is the 'expanded' version of the above so it's a little clearer
  27. what's happening:
  28. $ _dom1 = f$cvtime(,,"day")
  29. $ _dom2 = f$cvtime(f$fao("+!UL-0",34-_dom1),,"day")
  30. $ write sys$output "Current day of month is: ''_dom1'"
  31. $ write sys$output "34 days past first of this month is day number ''_dom2' of next month"
  32. $ _neom = f$ele(0," ",f$cvtime(f$fao("+!UL-0",34-_dom1-_dom2),"absolute"))
  33. $ write sys$output "Next EOM is: ''_neom'"
  34. -- 
  35. David G. North, CCP
  36. d_north@ondec.lonestar.org {...!texsun!montagar!ondec!d_north}
  37. onDEC systems                                 "Everyone's crazy but you & me...
  38. P.O.Box 795848, Dallas TX  75379-5848          and come to think about it, I'm
  39. (214)985-1316 ... (214)902-3957                not so sure about you either!"
  40.