Help using Base SAS procedures

query

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 145
Accepted Solution

query

I have a dataset with four variables id,acn,acn1,acn2 with id as identifier variable..I should output those records where  acn, acn1,acn2 are not equal to NOT APPLICABLE  or missing


Accepted Solutions
Solution
‎12-31-2014 12:45 PM
Trusted Advisor
Posts: 1,131

Re: query

please try

data want;

set have;

if acn not in ("NOT APPLICABLE",' ') and acn1 not in ("NOT APPLICABLE",' ') and acn2 not in ("NOT APPLICABLE",' ') then output;

run;

Thanks,

Jag

Thanks,
Jag

View solution in original post


All Replies
Solution
‎12-31-2014 12:45 PM
Trusted Advisor
Posts: 1,131

Re: query

please try

data want;

set have;

if acn not in ("NOT APPLICABLE",' ') and acn1 not in ("NOT APPLICABLE",' ') and acn2 not in ("NOT APPLICABLE",' ') then output;

run;

Thanks,

Jag

Thanks,
Jag
Trusted Advisor
Posts: 1,204

Re: query

At least one or all of the variables acn, acn1,acn2 should satisfy conditions at the same time?

☑ This topic is SOLVED.

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

Discussion stats
  • 2 replies
  • 232 views
  • 0 likes
  • 3 in conversation