Help using Base SAS procedures

Statement to remove all observations below a certain string.

Reply
Contributor
Posts: 54

Statement to remove all observations below a certain string.

Hello there!

I have a small issue i've been googleing to no avail and would appreciate some help if that's ok.

I have an exported report that's in a stupid format.

once read in I want a statement to run to say the following.

IF Var1 = "UC" then delete all observations below it?

Is that possible?

many thanks in advance.

Stret

Respected Advisor
Posts: 3,799

Re: Statement to remove all observations below a certain string.

data clip;

  set unclip;

  output;

  if var1 eq 'UC' then stop;

  run;

Ask a Question
Discussion stats
  • 1 reply
  • 185 views
  • 1 like
  • 2 in conversation