Hello all,
Is there a way to see the variable names of a dataset in SAS and also the count of values repeated in a variable in a sas dataset?
Regards,
Blue Blue
PROC CONTENTS shows all variables, and PROC FREQ shows value distributions.
Hi,
in order to see a list of variable names of a dataset I would suggest to use the PROC CONTENTS. This procedure provides a lot of information related to a table and shows also the list of variables (and variable properties)
https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/n1hqa4dk5tay0an15nrys1iwr5o2.htm
in order to obtain the count of values for a column I would suggest to use the PROC FREQ.This procedure creates a report with frequency counts and can be used for both numeric and character variables,
https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/procstat/procstat_freq_syntax01.htm,
Best regards
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.