01-20-2017 07:36 PM
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?
01-20-2017 08:43 PM - edited 01-20-2017 08:47 PM
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.
01-20-2017 09:02 PM
01-20-2017 10:25 PM
@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:
The first programming course is free and on the bottom right hand side of the page.
Tons of SAS tutorials with code samples
If you have a specific topic in mind try searching on Lexjansen.com
01-21-2017 08:52 AM
01-21-2017 11:23 PM
01-22-2017 09:53 AM