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