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: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 690 views
  • 1 like
  • 2 in conversation