DATA Step, Macro, Functions and more

Passing macro to variables to find the length

Reply
Regular Contributor
Posts: 229

Passing macro to variables to find the length

Hi

I am having a Dataset in work library and the name of the dataset is trans_mon in this dataset 250-300 character variables are there now i want to find the length of character variables(length of the observartion).How can i do this by passing the macro .As i am having 2-3 datasets like this
Super User
Posts: 5,431

Re: Passing macro to variables to find the length

The SQL interface offers you the possibility to create macro variables from a query result. Information on column length is available in DICTIONARY.COLUMNS. You may wish to know whether the table is compressed or not, look in DICTIONARY.TABLES.

/Linus
Data never sleeps
N/A
Posts: 0

Re: Passing macro to variables to find the length

Try using:
Proc contents
Ask a Question
Discussion stats
  • 2 replies
  • 121 views
  • 0 likes
  • 3 in conversation