Date: Thu, 9 Mar 2000 13:47:44 -0700
Reply-To: Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Subject: Re: Dates can be tricky
Content-Type: text/plain; charset=US-ASCII
I would claim that SAS is doing the wrong thing in the example below.
An analogous statement,
x = input('20l2', 4.);
does produce an error.
PL/I had an error handler for this situation. When I dealt with keypunched data,
it came in very handy. SAS could use some improvements in how run-time
errors are processed.
>>> WHITLOI1 <WHITLOI1@WESTAT.COM> 03/09/2000 11:54 am >>>
Subject: Dates can be tricky
Summary: This is only half a bug, but a disturbing half!
Respondent: Ian Whitlock <whitloi1@westat.com>
A colleague came with a problem similar to the one below. Her date
was not quite so far in the future but the value of QDT was the same.
In the original problem the date was typed into a flat file and read
in as control information for a much larger program.
1 data _null_ ;
2 input cdt $char11. ;
3 dt = input ( compress(cdt,"-"), date9. ) ;
4 qdt=put(dt,mmddyy8.) ;
5 put cdt= qdt=;
6 cards ;
CDT=2-FEB-2O22 QDT=02/02/02
NOTE: The DATA statement used 0.48 seconds.
This log comes from 6.12 under Windows 95, but the original
originated on 6.09E under VMS; and, of course, the results are same
in version 8.
There is no need to reply, just laugh or cry quietly when you spot
the problem.
Ian Whitlock