getting last row from a raw data

Reply
Occasional Contributor
Posts: 8

getting last row from a raw data

hi all,

Can anybody tell me how to extract the last row from raw data when total no. of rows are not known. i can extract subset of rows (from-to) by using FIRSTOBS and OBS

but do not know how to get last row if no of rows not known.

Thanks.....................

Super Contributor
Posts: 349

Re: getting last row from a raw data

Hi,

Try this..Hope it helps...

filename test "F:\Community_SAS\test.csv";

          

            data test;

               infile test truncover dlm=',' end=eof;

               input name $;

               n+1;

    if eof then output;

        run;

Thanks,

Shiva

Ask a Question
Discussion stats
  • 1 reply
  • 228 views
  • 0 likes
  • 2 in conversation