LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (November 2005, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments: To: Cameron Hooper <chooper@UMICH.EDU>
In-Reply-To:  <>
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;



Back to: Top of message | Previous page | Main SAS-L page