DATA Step, Macro, Functions and more

Removing the first row

Reply
N/A
Posts: 0

Removing the first row

Hi again.

How do I remove the first row from reading into the DATA step?

I have a file which has a Header Record that has titles of the columns on the first row followed by the actual data - how do I remove this line before sending to the DATA step.

Thanks again.
Shelton.
Valued Guide
Posts: 2,175

Re: Removing the first row

in what part of the sas system are you reading the file?
EG, Data Step, DI?
The options are different in each.
Frequent Contributor
Posts: 82

Re: Removing the first row

Maybe option firstobs=2 is what you need
N/A
Posts: 0

Re: Removing the first row

I was doing it in the datastep - I will try what ieva suggested.

Thanks Message was edited by: shelton
N/A
Posts: 0

Re: Removing the first row

Is it possible to do this at the DATA step and not at the gobal OPTIONS level ?

Regards
Shelton
Respected Advisor
Posts: 3,890

Re: Removing the first row

data test;
infile .... firstobs=2...
...
Ask a Question
Discussion stats
  • 5 replies
  • 5114 views
  • 1 like
  • 4 in conversation