BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
KS99
Obsidian | Level 7
Dear Mkeintz

Thank you very much for your detailed explanations!
Only got back to SAS community after an extended span of research.
Wish you a very good rest of the day!

KS -,


PeterClemmensen
Tourmaline | Level 20

Just as an alternative

 

data Network;
input  Cusip Analyst;
cards;
1  1  
1  2  
1  3  
2  8  
2  9  
2  11 
2  10 
2  12 
3  45 
3  46 
;

proc transpose data=Network out=wide prefix = a;
    by Cusip;
    id Analyst;
    var Analyst;
run;

proc summary data = wide missing;
   by Cusip;
   class a:;
   ways 2;
   output out = temp / ways;
run;

data want(keep = Cusip var1 var2);
   set temp;
   if n(of a:) = 2;
   var1 = largest(2, of a:);
   var2 = largest(1, of a:);
run;

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
  • 16 replies
  • 2203 views
  • 8 likes
  • 6 in conversation