BookmarkSubscribeRSS Feed
YKU
Calcite | Level 5 YKU
Calcite | Level 5

Hi 

 

I am building a data dictionary by SAS with proc contents statement. However, some variable name are extremely long, exceeded 50-100 characters with special symbols. The outcome of proc content has a limited length of 32. How do I extend the output column length? 

 

Thanks

Welkin

2 REPLIES 2
Reeza
Super User
Variable names are restricted to 32 characters, you cannot have variable names longer than that. You may have variable labels that are longer?

Either way, all of this data can be queried from sashelp.vcolumn data set instead of PROC CONTENTS.
Tom
Super User Tom
Super User

@YKU wrote:

Hi 

 

I am building a data dictionary by SAS with proc contents statement. However, some variable name are extremely long, exceeded 50-100 characters with special symbols. The outcome of proc content has a limited length of 32. How do I extend the output column length? 

 

Thanks

Welkin


There is something wrong with the way you are describing your problem.  If you are running PROC CONTENTS on existing SAS datasets then the names of the variables (NAME) or dataset (MEMNAME) cannot exceed 32 bytes.  The LABEL (and MEMLABEL) attached to them can be up to 255 bytes.

 

Perhaps you mean you want to use SAS to query metadata about objects in some external database?  In that case you will need to find out what commands that database supports for getting that information out and what format it produces.