HP3000-L Archives

September 1998, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Wirt Atmar <[log in to unmask]>
Reply To:
Date:
Fri, 25 Sep 1998 11:12:11 EDT
Content-Type:
text/plain
Parts/Attachments:
text/plain (27 lines)
Rob Marsicek writes:

> MPE V, Release 30 changed the CALENDAR intrinsic to return the number of
>  years since 1900 instead of the 2 digit year of the century, so in 2000
>  it returns 100 instead of 0.  (See COMMUNICATOR 3000, MPE V Release 3P,
>  Version G.3P.00 for details.)
>
>  I need a version of CALENDAR which follows the old convention of
>  returning only a 0 through 99 year of century.  I’d put this routine in
>  an SL to be accessed with the LIB=G parameter on the RUN commands for a
>  flock of programs that abort when years since 1900 rolls over to 100.
>  This will save me a bunch of unnecessary recompiles.  (All programs
>  compiled with my version of REX/3000 abort in 2000.)
>
>  This should be a simple SPL routine, but I’d rather buy it than learn
>  the SPL required for this one task.  This is the old “classic” MPE, NOT
>  MPE/iX.

If you were going to learn SPL, Rob, you couldn't pick an easier task to do
it. Simply write an SPL (or FORTRAN or COBOL) routine that calls HP's new
CALENDAR routine -- and then have your routine test the year number returned.
If the year is greater than 99, subtract 100 from the value and return your
modified value, in the manner you want to see it, and then put this new
interceptor routine in your local group's SL.

Wirt Atmar

ATOM RSS1 RSS2