| Date: | Sun, 14 Nov 1999 18:56:16 -0500 |
| Reply-To: | Jian Sun <jsun@AEI.NET> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Jian Sun <jsun@AEI.NET> |
| Subject: | Re: reading dataset but skipping label text. |
|---|
Wen-Feng,
Write firstobs=2 on the INFILE line.
SAS will read data from the second observation.
infile 'c:\dataset\data.txt' firstobs=2;
Jian
Wen-Feng Hsiao <d8442803@student.nsysu.edu.tw> wrote in message
news:MPG.129939dbdc24827f98970c@netnews.hinet.net...
> Dear Experts,
>
> If I want to read data from an external file whose format is the
> following. How can I skip the first row?
>
> --- data.txt (with tabs to separate columns)---
> label1 label2
> n11 n12
> n21 n22
> ...
>
> I tried to read it by the following statements, but no sccess. Please
> help, thanks!
>
> data senior
> infile 'c:\dataset\data.txt' expandtabs;
> input lab1$ lab2$;
> drop lab1 lab2;
> input n1 n2;
> ...
|