I have a folder names samples and there are n number of SAS files... all i need to do is extract Column Names, Datatype, Size and # of Records and dump it into an excel spreadsheet.
The desired spreadseet is attached.
PS: I am new to the SAS world so please answer the code with explanation if possible.
Thanks in advance.
Rushabh Shah
Use below Contents procedure to get Column Names, Datatype, Size etc from SAS file by giving library name.
Repeat this or write a macro to get all the librarie's SAS files info and collate to one single SAS file.
proc contents data=&inlib..&indata out=contdata;
run;
Export sas dataset contdata to an excel file using proc export.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.