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-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

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