Skip the dash line

Accepted Solution Solved
Reply
Contributor
Posts: 26
Accepted Solution

Skip the dash line

 This is my data in the text file.

MPG    WEIGHT    PRICE
----------------------
 22     2930      4099
 17     3350      4749
 22     2640      3799
 20     3250      4816
 15     4080      7827

I want to use do loop and array to generate the dadaset. But I am not sure how to deal with the second line, which is dash line. I want to skip it.


Accepted Solutions
Solution
‎03-19-2017 12:46 PM
Super User
Posts: 1,117

Re: Skip the dash line

[ Edited ]

This will work as we are trying to read the data from third observation

 

data have;
infile 'F:\new.txt' firstobs=3 missover;
input MPG    WEIGHT    PRICE;
run;

 

Thanks,
Jag

View solution in original post


All Replies
Solution
‎03-19-2017 12:46 PM
Super User
Posts: 1,117

Re: Skip the dash line

[ Edited ]

This will work as we are trying to read the data from third observation

 

data have;
infile 'F:\new.txt' firstobs=3 missover;
input MPG    WEIGHT    PRICE;
run;

 

Thanks,
Jag
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 122 views
  • 0 likes
  • 2 in conversation