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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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