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 (July 2004, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 8 Jul 2004 08:50:34 -0700
Reply-To:     Kerry <kerry.arrowsmith@SAINSBURYS.CO.UK>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Kerry <kerry.arrowsmith@SAINSBURYS.CO.UK>
Organization: http://groups.google.com
Subject:      import delimited file specifying field names
Content-Type: text/plain; charset=ISO-8859-1

I have a pipe delimited, quote surround file, no header, unknown field lengths, to import to SAS.

The following code gives me everything but the variable names. How can I specify these as well, without having to add field names to the raw file?

PROC IMPORT OUT= <Libname>.<DataSetName> DATAFILE= "<FilePath>.<FileName>" DBMS=DLM REPLACE; DELIMITER='7C'x; GETNAMES=NO; DATAROW=1; RUN;

I HAVE noticed that SAS converts this to a data step, adding format, informat and input statements. I know that I could add the correct field names to this input but there must be a way to get the file in one step!! Is there?

Thanks Kerry


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