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

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 644 views
  • 1 like
  • 2 in conversation