BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
juju_p
Obsidian | Level 7

Hello,

 

I would like to do something with SAS but I am not sure how to go about it.

 

I am looping through an array of 3 elements and whenever I have a match, I would like to print the name of the element itself and not the content of the element.

Is this possible with SAS?

 

Thanks a lot!

 

Array CT (3) CT1 CT2 CT3;

DO i=1 to 3;
IF CT(i)  = 1 THEN DO;
IF CT = '' THEN CT = CTi;
ELSE IF CT^= '' THEN CT= strip(CT) || '/' || strip(CTi);
END;
END;

 

1 ACCEPTED SOLUTION
1 REPLY 1

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!
LIBNAME 101

Follow along as SAS technical trainer Dominique Weatherspoon expertly answers all your questions about SAS Libraries.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 580 views
  • 1 like
  • 2 in conversation