BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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.
1 REPLY 1
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
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"
http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/a000063675.htm
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 855 views
  • 0 likes
  • 2 in conversation