You are faced with the task of saving an Excel xlsx file as a permanent data set after uploading to SAS Studio, then using proc contents to view the contents of the Excel file and proc freq to find the frequency in which a specific variable appears in the file. What does your basic program look like?
Hi:
You cannot use the LIBNAME engine to run PROC CONTENTS directly on the XLSX file when you are using SAS Studio and SAS University Edition.
So, in brief, I would:
1) upload the XLSX file to a SAS Studio folder
2) run PROC IMPORT on the XLSX file using DBMS=XLSX to create a SAS dataset
3) run PROC CONTENTS on the SAS dataset from #2 (NOT the XLSX file from #1)
4) Run PROC FREQ on the datatset from #2 using the TABLE statement for my variable and specifying options like NOCUM, NOPERCENT, as needed.
Regarding #2, I would test my PROC IMPORT step by creating a WORK dataset first, then once I knew that the IMPORT was correct, I would issue a LIBNAME statement to a folder on the University Edition like:
libname myperm '/folders/myfolders/keepdata';
Then I would run PROC IMPORT using a 2-level name to save the SAS version of the XLSX file to this permanent library.
cynthia
@GrizzlyDee This reads like homework. Do you have a specific issue that you need help with instead of posting your assignment?
SAS video tutorials are here:
http://support.sas.com/training/tutorial/
The first programming course is free and on the bottom right hand side of the page.
Tons of SAS tutorials with code samples
http://www.ats.ucla.edu/stat/sas/
If you have a specific topic in mind try searching on Lexjansen.com
Uploading a dataset is merely storing it in a drive that SAS can access.
Kind of like uploading a file to Dropbox.
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.