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
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
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;
Use if condition like any other language.
DATA want;
SET have;
if DAT ^="DAT6" then DELETE ;
RUN;
@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 🙂
Yeah your right , I couldn't find the right forum I guess to ask this question . I'm a new user , excuse my mistake .
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.