DATA Step, Macro, Functions and more

Identify format(C or N) of a variable in a dataset WITHOUT opening dataset.

Reply
Contributor
Posts: 30

Identify format(C or N) of a variable in a dataset WITHOUT opening dataset.

Hello,

 

Is there a way to find out the format of the variable WITHOUT opening the dataset?

 

For example:

I want to know whether the Age variable is character or numeric in sashelp.class.

Please note that I want to know this WITHOUT opening the dataset. 

Also, I DON'T want to use PROC Contents.

 

 

Thank You for your help.

Super User
Posts: 17,899

Re: Identify format(C or N) of a variable in a dataset WITHOUT opening dataset.

Why no proc contents?

 Sashelp.vcolumn has the metadata for all datasets in your libraries. Query the table for relevant information. 

Ask a Question
Discussion stats
  • 1 reply
  • 186 views
  • 0 likes
  • 2 in conversation