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

  1. Path: sparky!uunet!sun-barr!ames!data.nas.nasa.gov!taligent!apple!netcomsv!iscnvx!enterprise!news
  2. From: marshall@force.ssd.lmsc.lockheed.com (Bob Marshall)
  3. Newsgroups: comp.os.vms
  4. Subject: Re: Submitting Jobs for Last Day of Month
  5. Message-ID: <1992Aug25.165650.4373@enterprise.rdd.lmsc.lockheed.com>
  6. Date: 25 Aug 92 16:56:50 GMT
  7. References: <1992Aug25.102008.28397@jupiter.sun.csd.unb.ca>,<1992Aug25.142017.1300@Rapnet.Sanders.Lockheed.Com>
  8. Sender: news@enterprise.rdd.lmsc.lockheed.com
  9. Reply-To: marshall@force.ssd.lmsc.lockheed.com
  10. Organization: LMSC, Sunnyvale, California
  11. Lines: 38
  12. Nntp-Posting-Host: nebula.ssd.lmsc.lockheed.com
  13.  
  14. In article <1992Aug25.142017.1300@Rapnet.Sanders.Lockheed.Com>, 
  15. mores@eavax.sanders.lockheed.com (David C. Mores) writes:
  16. >--
  17. >Yes, it is fairly easy.  Using lexical functions you should be able to create
  18. >a text string for the first day of the next month.  Given that, it is just a
  19. >simple matter of one day before as follows:
  20. >
  21. >    $ submit xxx.com/after="1-SEP-1992-1 0:0"
  22. >
  23. >The "-1 0:0" says one day before 1-SEP-1992.  Read more on this in the VMS DCL
  24. >Concepts manual.
  25.  
  26. Almost. The "-1 0:0" in this case actually is equivalent to "-10:0" (the
  27. space is ignored), which in this case stands for hours. So the job would
  28. get submitted 10 hours before midnight on 1-SEP-1992, or 31-AUG-1992:14:00.
  29. True, it does happen to do what the poster was asking for, but for the
  30. wrong reason. In general, to start the job at time hh:mm on the last 
  31. day of the month it should be :
  32.  
  33.     $ submit xxx.com/after="1-SEP-1992:hh:mm-1-"
  34.  
  35. A sample command procedure (which admittedly has lots of room for
  36. improvement) for submitting the job at 00:00:00 on the last day
  37. of the current month :
  38.  
  39.   $ dom = f$cvtime(,,"DAY")  ! Day-of-month for today
  40.   $ v = 32 - dom             ! Delta days guaranteed to put us into next month
  41.   $ next_month = f$cvtime("00:00:00+''v'-","ABSOLUTE") ! A day early next month
  42.   $ next_month = "1" + f$extract(1,100,next_month) ! Replace dd with "1"
  43.   $ submit/after="''next_month'-1-" b.com          ! Go back one day
  44.  
  45. =============================================================================
  46. Bob Marshall                     \\     "It ain't age
  47. Lockheed Missiles & Space Co.     \\     That makes me look this way
  48. Sunnyvale, CA                      \\    It ain't the years, boys,
  49. marshall@force.ssd.lmsc.lockheed.com\\   It's the miles"
  50. "I tell the truth 'cept when I lie"  \\     - Chris LeDoux
  51. =============================================================================
  52.