Which Sas procedure we use to analyze the content of table sas : contents , freq , univariate or print ?
Any help please
That's a strange question. [ The answer is in your question🙂. ]
What do you mean by 'content'?
You can of course use PROC CONTENTS; but the other procedures you mention are also viable options.
What version of SAS are you using?
Find out by submitting:
%PUT &=sysvlong;
If you have SAS VIYA, you can additionally use PROC CARDINALITY:
proc cardinality data=mycas.XYZ outcard=mycas.card
outdetails=mycas.details maxlevels=5;
run;
Cheers,
Koen
Hello,
SAS Studio is not a SAS version.
SAS Studio can be used as a browser-based (front-end) editor for SAS 9.4 and SAS VIYA!
Please submit:
%PUT &=sysvlong;
and look in the log window for the result!
My LOG says:
SYSVLONG=V.03.05M0P111119
when I am in VIYA and says
SYSVLONG=9.04.01M4P110916
when I am in SAS 9.4 Maintenance Level 4
**** But please elaborate on what you want to find out with your 'content' query. I still don't have a clue on what you want to achieve. ****
Cheers,
Koen
Submit this and you will find out what each of these procedures could mean to you.
I have put the PROC PRINT in comment as it just displays the big table in the OUTPUT.
It's better to view the entire table by giving the 'VT SASHELP.SHOES' command in the command line, where 'VT' is for ViewTable.
*PROC PRINT data=sashelp.shoes; *run;
PROC CONTENTS data=sashelp.shoes; run;
PROC UNIVARIATE data=sashelp.shoes PLOT; var _numeric_; run;
PROC FREQ data=sashelp.shoes; tables _character_; run;
/* end of program */
As said, in VIYA you can additionally use a PROC CARDINALITY!!
Good luck,
Koen
Thank you for your help
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.