Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: jasantos@ultranet.com (John A Santos)
Subject: Re: Pretty stupid request regarding Y2K and PDP 11/23
Date: 1998/02/28	[thread overview]
Message-ID: <MPG.f619569ef480b81989695@news.ma.ultranet.com> (raw)
In-Reply-To: 6d6q7t$eh4$1@nntp.ucs.ubc.ca


In article <6d6q7t$eh4$1@nntp.ucs.ubc.ca>, shoppa@alph02.triumf.ca 
says...
> In article <NmHHjAAqgf90Ewzx@dbslbox.demon.co.uk>,
> Dave Brettell  <Dave@dbslbox.demon.co.uk> wrote:
> >An old customer of mine has a PDP 11/23 running RSTS/E (god knows what
> >version).
> >They use a retail system written in un-compiled BASIC (both 2 and 4 word
> >versions - remember that back in the 70s ? - talk about LEGACY).
> >The code is dodgy at best - two digit year fields and dates are critical
> >(especially those before that magic year - how many seconds since 197
> >what not ?) ;-)
> >I changed the date on the PDP to the last day of December 1999 at 23:59
> >and watched it roll.   The best I can describe the result is watching a
> >random date generator at work (tip: - use your old PDP systems to
> >generate lottery numbers ).
> 
RSTS/E (at least V10.1, but I suspect this goes back forever) won't
roll the date over correctly at end-of-year for more than one year
after the boot date.  To test Y2K stuff, you need to reboot and set the
date at boot time to 01-Jan-1999 or later.

I have a theory as to why this is the case, but haven't been able to
test it because or PDP-11 died a few months ago, and I haven't had time
to try to fix it.  (It seems to be getting a power-fail trap between a
few milliseconds and maybe a second or two after starting the boot strap.
I think there's a bad voltage regulator, but haven't been able to isolate
it.  It is an 11/73-Able Microverter in an 11/40 CPU cabinet.)

RSTS/E internal date format is an unsigned word whose value is
(YYYY-1970)*1000+DOY, where YYYY is the year and DOY is the day
of the year.  For example, 31-DEC-1997 is 27365, and 01-Jan-1998
is 28001.

My theory is there is a word, computed at boot-time, containing the 
RSTS/E format date of the last day of the year (or maybe the last day+1, 
i.e. "32-DEC" or 27366 for systems booted in 1997), and at midnight on 
31-DEC, when the clock service interrupt increments the date word, it 
compares the date to this word, and if they are the same, it resets the 
date to 01-JAN-YY+1.  This method would save a fair amount of code in the 
clock service to check every night at midnight if this is 31-DEC 
(including handling leap year).  The cost of this method is that end-of-
year won't work right if the system is up for more than a year (the 
longest uptime I've ever seen on a RSTS/E system was about 9 months), or 
if you set the date to after 31-DEC of the boot year (or before 01-JAN of 
the boot year.)  Apparently the SET-TIME sys() call doesn't update this 
word.

If this theory is correct, it should be possible to POKE the monitor so
you could do testing without rebooting.  (Exercise left for the reader.)

We did fairly extensive Y2K testing with RSTS/E V10.1.  There seemed to
be no problems at all before 31-Dec-2002, while the date value is 
positive.

There were no real problems after this date with system code, and most
user programs were also fine as long as they treated DATE values as
unsigned words.  This means you are OK until 31-DEC-2035.

Of course, you always need to be careful of 2-digit string dates, storing
the year in a byte, and input and output conversions.

> Well, if you come over to the PDP-11 specific newsgroups -
> including comp.os.rsts, vmsnet.pdp-11, and alt.sys.pdp11 - you'll
> find a fair number of people with -11's that are going to continue
> running well into the 21st century.  The RT-11 and RSX-11M+ OS's
> are now fully Year 2000 compliant, but I don't know about RSTS/E.
>
As Terry said in another response, V10.1 is claimed by DEC to be Y2K
compliant.

> Of course, in an application such as yours where there's a huge amount
> of date-dependent stuff in the application software, the OS compliance
> is the easy end of the problem.
> 
As I said...

> >Are there any conversion routines for BASIC (2 or 4 word) to say C or
> >COBOL or whatever that will run on a Y2K compliant platform (any Y2K
> >complient VAX systems about ?).
> 
2 or 4 word math package is really irrelevant to this.

However, package capable of converting BASIC to any other language is
going to be able to understand the meaning of the source code.  Any
Y2K bugs in the BASIC source will be faithfully replicated in the C or
COBOL or whatever.  You can't get out of it that easily!

If you want to go to a platform that won't drop dead in 2036, though,
VMS on either a VAX or Alpha will present no problems for another 8,000
years.  It is easy to convert most BASIC-PLUS source code (except for
SYS() calls) to either VAX BASIC or DEC BASIC (which are extremely
compatible with each other.)  You may have to do some bulk formatting
conversions first though:  1) run the sources through TECO with the
/8 (or any other number you like) to convert <LF>-delimited continuation
lines to &<CR> delimited lines, and 2) convert ":" statement separators 
to "\" separators.  You will have to to some work on I/O (OPEN files
appropriately as either text files or VIRTUAL files, or go to full-blown
RMS record management if you need record locking, etc.)  BASIC-PLUS-2
is even easier to convert; the delimiters are probably already okay, and
it probably already uses RMS.

Of course, migrating an entire system is much more work than a single
program.  One program can take anywhere from a few minutes to several
days; an entire system can take months to years.

> Open your eyes!  PDP-11's and VAXen are Y2K compliant platforms, with
> the right software!
> 
> One very important question is whether the BASIC interpreter used
> by your clients is available in a Y2K compliant version.  Which
> version of RSTS/E BASIC are you using?  (Or BASICs, as the case may be.)
> 
> Tim. (shoppa@triumf.ca)
> 
John Santos



  parent reply	other threads:[~1998-02-28  5:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-02-26  5:00 Pretty stupid request regarding Y2K and PDP 11/23 Dave Brettell
1998-02-27  5:00 ` Joel Gallun
1998-02-27  5:00   ` John Wilson
1998-02-27  5:00 ` Tim Shoppa
1998-02-27  5:00   ` Terry Kennedy
1998-02-28  5:00   ` John A Santos [this message]
1998-02-28  5:00     ` Stuart Brook
1998-03-01  5:00 ` Randy Park
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox