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 (January 2003, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 31 Jan 2003 16:14:29 -0500
Reply-To:     Debbie Cooper <debbie.cooper@STEVENSONCOMPANY.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Debbie Cooper <debbie.cooper@STEVENSONCOMPANY.COM>
Subject:      Importing tab delimited files
Content-Type: text/plain; charset="iso-8859-1"

We will be receiving survey results in the form of tab delimited files soon. There will be about 180 files representing different products that we research. The problem I'm having is that the files are being sent to me in tab-delimited format with the field names in the first row of the file. The data is such that if no respondent answers a particular question, that field/column will not show up. So there won't be an empty space representing no answer, the field simply won't be there.

Because of this I've tried to use Proc Import to read the files but what's happening is SAS reads each file and can potentially assign different formats to the same fields in different files. Not only that but we have a few text fields (open-end questions) as well and SAS is apparantly looking at the first record and deciding what length to give these fields, so subsequent records can have the fields truncated.

SAS tells me I need to use an INFILE statement to read these files and that makes sense except for the fact that I'll never know which fields will or won't show up in the files.

Any suggestions would be greatly appreciated.

Thanks, Debbie


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