Scott,
Check out DATES.MPEX.VECSL (the contributed software that is on the VESOFT tape).
Leonard
--
Leonard S. Berkowitz
Perot Health Care Systems
(Harvard Pilgrim Health Care account)
voice: 617-509-1212
fax: 617-509-1955
pager: 781-226-2431
"Gates, Scott"
<[log in to unmask]> To: [log in to unmask]
Sent by: HP-3000 cc:
Systems Subject: [HP3000-L] Need Date command File
Discussion
<[log in to unmask]
TC.EDU>
07/30/2003 11:26
AM
Please respond to
"Gates, Scott"
I've been writing a little command file that sets system variables as dates
for use in jobs. It still kinda crude, hasn't been fully tested and a
couple are weird but fit my specific needs at the time, but, it presently
sets End of Last month, Beginning of Last month and the same for the last
quarter. (Kind like Maestro would set, if we had Maestro). It even handle
leap years (Within reason: We're NOT going to care that 2100 is not a leap
year, now are we?. THANKS HP!)
As I do this, I think, I GOTTA be reinventing the wheel.
So, does anyone have any little Date Utility ditties out there that like
will SETVAR TODAY-1, TODAY-2, TODAY-7 TODAY-30 etc, etc.
I've appended mine to the end of this note.
Scott Gates
Programmer/Analyst
Information Services
Our Lady of Bellefonte Hospital
P.O. Box 789
Ashland, Kentucky 41105-0789
-----------------------------------
Phone: (606)833-3773
Fax: (606)833-3342
-----------------------------------
Quote: ...Computers are...stupid. Unlike human beings, computers possess the
truly
profound stupidity of the inanimate. - Bruce Sterling - THE HACKER CRACKDOWN
-----------------------------------
Intranet: http://Olbh01iis/intranet/index.html
<http://Olbh01iis/intranet/index.html>
Primary e-mail : [mailto:[log in to unmask] <mailto:[log in to unmask]> ]
Alternate e-mail : [mailto:[log in to unmask] <mailto:[log in to unmask]> ]
-----------------------------------
Our Lady of Bellefonte : http://www.olbh.com <http://www.olbh.com>
-----------------------------------
Confidentiality Notice: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail, fax, or phone and destroy all copies of
the original message.
COMMENT SETVARDT
SETVAR LASTMONTH !HPMONTH - 1
IF LASTMONTH = 0
SETVAR REPYEAR !HPYYYY - 1
SETVAR LASTMONTH 12
ELSE
SETVAR REPYEAR !HPYYYY
ENDIF
SETVAR YEARMOD,!HPYYYY MOD 4
SETVAR HPLEAPYR,FALSE
IF YEARMOD = 0 THEN
SETVAR HPLEAPYR,TRUE
ENDIF
IF !LASTMONTH = 2 AND !HPLEAPYR = TRUE
SETVAR TEOM "29"
ELSE
IF !LASTMONTH = 2
SETVAR TEOM "28"
ELSE
IF !LASTMONTH = 4 OR !LASTMONTH = 6 OR !LASTMONTH = 9 OR !LASTMONTH = 11
SETVAR TEOM "30"
ELSE
SETVAR TEOM "31"
ENDIF
ENDIF
ENDIF
SETVAR TYY ,(RHT("!REPYEAR",2))
SETVAR TMM, (RHT("0"+ "!LASTMONTH",2))
SETVAR BOM, ("!TYY"+"!TMM"+"01")
SETVAR EOM, ("!TYY"+"!TMM"+"!TEOM")
COMMENT CALCULATE LAST BEQ AND EOQ
IF !HPMONTH = 4 OR !HPMONTH = 5 OR !HPMONTH = 6
SETVAR BOQ ,("!TYY" + "0101")
SETVAR EOQ ,("!TYY" + "0331")
ENDIF
IF !HPMONTH = 7 OR !HPMONTH = 8 OR !HPMONTH = 9
SETVAR BOQ ,("!TYY" + "0401")
SETVAR EOQ ,("!TYY" + "0630")
ENDIF
IF !HPMONTH = 10 OR !HPMONTH = 11 OR !HPMONTH = 12
SETVAR BOQ ,("!TYY" + "0701")
SETVAR EOQ ,("!TYY" + "0930")
ENDIF
IF !HPMONTH = 1 OR !HPMONTH = 2 OR !HPMONTH = 3
SETVAR HPLASTYEAR, !HPYEAR-1
SETVAR BOQ, ((RHT("0"+ "!HPLASTYEAR",2)) + "1001")
SETVAR EOQ ,((RHT("0"+ "!HPLASTYEAR",2)) + "1231")
ENDIF
IF !LASTMONTH = 1
SETVAR TMONTH,"JANUARY"
ENDIF
IF !LASTMONTH = 2
SETVAR TMONTH,"FEBRUARY"
ENDIF
IF !LASTMONTH = 3
SETVAR TMONTH,"MARCH"
ENDIF
IF !LASTMONTH = 4
SETVAR TMONTH,"APRIL"
ENDIF
IF !LASTMONTH = 5
SETVAR TMONTH,"MAY"
ENDIF
IF !LASTMONTH = 6
SETVAR TMONTH,"JUNE"
ENDIF
IF !LASTMONTH = 7
SETVAR TMONTH,"JULY"
ENDIF
IF !LASTMONTH = 8
SETVAR TMONTH,"AUGUST"
ENDIF
IF !LASTMONTH = 9
SETVAR TMONTH,"SEPTEMBER"
ENDIF
IF !LASTMONTH = 10
SETVAR TMONTH,"OCTOBER"
ENDIF
IF !LASTMONTH = 11
SETVAR TMONTH,"NOVEMBER"
ENDIF
IF !LASTMONTH = 12
SETVAR TMONTH,"DECEMBER"
ENDIF
SETVAR REPLAB,"!TMONTH !REPYEAR"
showvar REPYEAR
showvar LASTMONTH
SHOWVAR BOM
SHOWVAR EOM
SHOWVAR TMONTH
SHOWVAR BOQ
SHOWVAR EOQ
showvar REPLAB
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|