| Date: | Mon, 3 Jan 2000 18:09:23 +0100 |
| Reply-To: | detecsm_hellriegelg@WESTLB.DE |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Gehard Hellriegel <detecsm_hellriegelg@WESTLB.DE> |
| Subject: | Antwort: Strange date problem |
| Content-type: | text/plain; charset=us-ascii |
|---|
Hi James,
try to read it in like:
input Studid & enrdate : date9. enrdate1 : date9. sem $ grade $;
(fokus on the colons between the variable names and the formats!!)
James Yang <jamesy99@HOTMAIL.COM> on 03.01.2000 17:50:52
Bitte antworten an James Yang <jamesy99@HOTMAIL.COM>
An: SAS-L@LISTSERV.UGA.EDU
Kopie: (Blindkopie: DeTeCSM HellriegelG/D/ExternalStaff/WLB)
Thema: Strange date problem
When I read in raw data, I faced following strange problem. Please kindly
provide your valuable advice. Thanks!!!!!
FILE1 is the external file which I want to read in, the data look like this:
S001, 02-AUG-91, 02-AUG-91, SUM1, A
S002, 11-AUG-90, 11-AUG-90, SUM1, B
I wrote following program to read in this data;
Data test;
infile file1 dsd;
input Studid & enrdate date9. enrdate1 date9. sem $ grade $;
format enrdate enrdate1 date9.;
run;
Follwoing is the strange output;
STUDID ENRDATE ENRDATE1 SEM GRADE
S001 02AUG1991 02AUG1909 1 SUM1
S002 11AUG1990 11AUG1909 0 SUM1
The first one ENRDATE read the correct date, but for ENRDATE1, the year add
a '0' and remove the last digit of the year to the next var. I don't know
why and how to deal with this. So if you can provide your helpful advice, it
would be apprecited pretty much. Thanks!
James
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
Mit freundlichen Gruessen
DeTeCSM, Gerhard Hellriegel
WestLB
Abteilung: 001-80622
Aderstr. 22
D - 40217 Duesseldorf
Tel.: +49211 826 6173
Fax: +49211 826 5393
|