DATA Step, Macro, Functions and more

Getting decoded format output in Proc Transpose

Posts: 0

Getting decoded format output in Proc Transpose

I have a macro that will do a data step for all datasets in a specified library, then it does a sort on all the datasets. I then do a proc transpose. The datasets all come together fine but the output under COL1 all the data is the uncoded values.
Example 1= NO the dataset shows 1 instead of no. How in a transpose do I get these values to come out. This program is to run generically across any study chosen within the application so using a format statement for specific formats will not work.
Super Contributor
Super Contributor
Posts: 3,174

Re: Getting decoded format output in Proc Transpose

There are specific, defined rules for PROC TRANSPOSE and handling numeric and character variables that have a 'formatted value' associated. See the documentation for applying an ID statement (and possibly the PREFIX= keyword) where you have a numeric variable value which you want to take on some other string when generating your SAS variable/column names during TRANSPOSE.

Scott Barry
SBBWorks, Inc.

PROC TRANSPOSE documentation, refer to section on "Attributes of Transposed Variables"
Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation