| Date: | Tue, 19 Jun 2007 14:03:36 -0400 |
| Reply-To: | "Keintz, H. Mark" <mkeintz@WHARTON.UPENN.EDU> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | "Keintz, H. Mark" <mkeintz@WHARTON.UPENN.EDU> |
| Subject: | Re: import variable names from delimited files |
| Content-Type: | text/plain; charset="us-ascii" |
A.K. Lee wrote:
> I have a bunch of dollar delimited files for conversion to SAS
datasets.
> I've written a small macro code using Proc import with guessing
rows=1000
> (needed as some colums have a lot of numerical data with few
character
> values). It works fine, only issue is that occasionaly a couple of
files
> are empty (i.e they have column headers but no data values).
>
> In such a case, I still want empty SAS datasets to be created giving
the
> variable names. However if there are no datavalues, SAS gives an error
such
> as this: "Unable to sample external file, no data in first 5 records."
>
> Thanks very much in advance,
> -A
If you have no data records, then how to expect to determine variable
type? And if you were somehow to know that some vars are character
vars, how would you assign their lengths?
Mark Keintz
Wharton Research Data Services
|