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

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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