KISS is a wonderful thing, anyday and especially at Holiday Season, anywhere and especially in coding.
Have you ever wanted a simple SAS solution to read in any separated value data into SAS table as Excel does for Excel worksheet? As simple as possible? Well here you will have it in a short macro code.
macro delimited2table(input=,delimiter=%str(;),max_string_len=100,output=); %if "%kupcase(&delimiter.)" EQ "'09'X" %then %do; %end; %else %do; %let delimiter="&delimiter."; %end; data &output.(compress=yes); length A B C D E F G H I J K L M N O P Q R S T U V W X Y Z AA AB AC AD AE AF AG AH AI AJ AK AL AM AN AO AP AQ AR AS AT AU AV AW AX AY AZ $ &max_string_len. ; infile "&input." delimiter=&delimiter. MISSOVER DSD lrecl=32767; input A $ B $ C $ D $ E $ F $ G $ H $ I $ J $ K $ L $ M $ N $ O $ P $ Q $ R $ S $ T $ U $ V $ W $ X $ Y $ Z $ AA $ AB $ AC $ AD $ AE $ AF $ AG $ AH $ AI $ AJ $ AK $ AL $ AM $ AN $ AO $ AP $ AQ $ AR $ AS $ AT $ AU $ AV $ AW $ AX $ AY $ AZ $ ; run; %mend;
And here are some sample macro calls to call this macro:
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.