BookmarkSubscribeRSS Feed
sasuser86
Calcite | Level 5
Hi
Please help on the below query for one of my investigation.

Data: student indicator1 indicator2
A 0 N
A 0 Y
A 1 N
A 1 Y
B 0 N
B 0 N
C 1 N
C 0 Y

I want to segregate the unique rows of students who have indicator 1 as
NOT 0 or indicator 2 as NOT N in my output. Please help to guide.



2 REPLIES 2
Amir
PROC Star

Hi,

 

This looks a bit like homework. What have you tried so far? Share any code you have tried and show the log with any error messages.

 

If you haven't tried anything yet then try looking at the if statement documentation, which includes examples:

 

http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000202239.htm

 

then you can post back your findings.

 

What you have said could almost be put into SAS:

 

if indicator1 ne 0 or indicator2 ne 'N'

 

Edit: For the "unique" requirement, you could test for "first.variable" and "last.variable".

 

 

Regards,

Amir.

novinosrin
Tourmaline | Level 20

what do you mean by

who have indicator 1 as
NOT 0 or indicator 2 as NOT N in my output.

 

Can you post the output for your input sample plz

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 602 views
  • 1 like
  • 3 in conversation