BookmarkSubscribeRSS Feed
Sarra-Matri
Obsidian | Level 7

 Which Sas procedure we use to analyze the content of  table sas  : contents , freq , univariate or print ?

Any help please 

6 REPLIES 6
sbxkoenk
SAS Super FREQ

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

Sarra-Matri
Obsidian | Level 7
sas studio
sbxkoenk
SAS Super FREQ

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

sbxkoenk
SAS Super FREQ

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

Sarra-Matri
Obsidian | Level 7

Thank you for your help

Reeza
Super User
Depends on what you mean by "analyze".

Variables Names and types/formats of variables? Then use Contents.

To explore categorical variables, use PROC FREQ.
To explore numerical variables, use PROC UNIVARIATE/MEANS/SUMMARY

Print will display the results.

Fastest way to answer the question - try each one.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Mastering the WHERE Clause in PROC SQL

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.

Discussion stats
  • 6 replies
  • 953 views
  • 2 likes
  • 3 in conversation