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.

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

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
  • 2 replies
  • 1153 views
  • 0 likes
  • 3 in conversation