Deletating Footer notes or last line from txt file

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 87
Accepted Solution

Deletating Footer notes or last line from txt file

i am importing an txt file using infile which contains 1st line header and last line footer

i am removing header but how to remove footer form last row

data example;

infile path.txt" firstobs=2

dlm='|' dsd missover ;

attrib name length=$50. informat=$50. format=$50.;

attrib sal length=8 informat=20. format=comma20.2;

input name no;

run;

how to remove footer from that text


Accepted Solutions
Solution
‎02-05-2013 07:28 AM
Super Contributor
Posts: 578

Re: Deletating Footer notes or last line from txt file

data example;

infile path.txt" firstobs=2 end=eof

dlm='|' dsd missover ;

attrib name length=$50. informat=$50. format=$50.;

attrib sal length=8 informat=20. format=comma20.2;

input name no;

if not eof then output;

run;

View solution in original post


All Replies
Solution
‎02-05-2013 07:28 AM
Super Contributor
Posts: 578

Re: Deletating Footer notes or last line from txt file

data example;

infile path.txt" firstobs=2 end=eof

dlm='|' dsd missover ;

attrib name length=$50. informat=$50. format=$50.;

attrib sal length=8 informat=20. format=comma20.2;

input name no;

if not eof then output;

run;

🔒 This topic is solved and locked.

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

Discussion stats
  • 1 reply
  • 850 views
  • 1 like
  • 2 in conversation