DATA Step, Macro, Functions and more

Doubt

Reply
New Contributor
Posts: 2

Doubt

I am new to Jump Scripting Language  .  How do I delete rows depending on the value in the column . 

eg . column name

 DAT

DAT6

DAT6

DAT6

DAT8

DAT9

 

So in my column DAT i want to keep only DAT6 and delete the other rows DAT8 and DAT9

 

Occasional Contributor
Posts: 9

Re: Doubt

any other supporting variable which can trigger  DAT6 Obsn ? whatever data you have provided based on that i can say only one thing 

 

data want;

set have ;

If _n_=1 ;

run;

thanks

 

Occasional Contributor
Posts: 9

Re: Doubt

data aa;
input dat $;
datalines;
DAT6
DAT6
DAT6
DAT6
DAT8
DAT7
;
proc sql;
create table want as
select distinct dat from aa
where Dat contains ("6");
quit;

PROC Star
Posts: 629

Re: Doubt

Use if condition like any other language.

 

DATA want;

SET have;

if DAT ^="DAT6" then DELETE ;

RUN;

Thanks,
Suryakiran
Super User
Posts: 24,003

Re: Doubt

@abhra07 JSL is part of JMP isn't it? Not part of SAS Base? If you're using JMP this is not the correct forum. 

 

If JSL is supported within SAS now, feel free to correct me and disregard this entire message Smiley Happy

New Contributor
Posts: 2

Re: Doubt

Yeah your right , I couldn't find the right forum I guess to ask this question . I'm a new user , excuse my mistake .

 

Super User
Posts: 24,003

Re: Doubt

The JMP forum is here:

https://community.jmp.com/

 

Good Luck Smiley Happy

Ask a Question
Discussion stats
  • 6 replies
  • 105 views
  • 0 likes
  • 4 in conversation