Date: Wed, 2 Nov 2005 12:13:25 -0500
Reply-To: "Michael S. Zdeb" <msz03@HEALTH.STATE.NY.US>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Michael S. Zdeb" <msz03@HEALTH.STATE.NY.US>
Subject: Re: Modified List Input
In-Reply-To: <344dcbc1910e9cfd07c282fd55be7594@umich.edu>
Content-type: text/plain; charset=US-ASCII
Hi....that won't fail since after you read VAR1, the 'pointer' is in the
space just after the value 'xxx' or 'yyy'. You only have 1 space between
the value of VAR1 and the value of DATE. So, you luck out and the data
step works --- read 10 columns. Put at least TWO spaces between the value
of VAR1 and DATE and it won't work --- but modified LIST input will work.
Mike Zdeb
U@Albany School of Public Health
1 University Drive
Rensselaer, NY 12144-3456
(P)518-402-6479
(F)630-604-1475
Cameron Hooper
<chooper@UMICH.ED
U> To
Sent by: "SAS(r) SAS-L@LISTSERV.UGA.EDU
Discussion" cc
<SAS-L@LISTSERV.U
GA.EDU> Subject
Modified List Input
11/02/2005 11:49
AM
Please respond to
Cameron Hooper
<chooper@UMICH.ED
U>
It is my understanding that the colon modifier is necessary to enable
non-standard data to be read using list input. For example, consider
the following raw data file:
---test.dat---
xxx 12/31/2000
yyy 01/10/2001
--------------
I expected the following data step to generate an error as the colon is
omitted from the input line. However, it works just fine.
data test;
infile 'test.dat';
length var1 $8.;
input var1 date mmddyy10.;
format date mmddyy10.;
run;
Shouldn't this fail? I thought the step should be written like this:
data test;
infile '/test.dat';
length var1 $8.;
input var1 date :mmddyy.;
format date mmddyy10.;
run;
Thanks
Cameron