Help using Base SAS procedures

Proc Transpose Copy

Accepted Solution Solved
Reply
Regular Contributor
Posts: 229
Accepted Solution

Proc Transpose Copy

Hello,

I was wondering when doing a Proc Transpose, i want to keep one variable just as it was. And copy it to the whole dataset.

proc transpose data = TEMP.TRANSP () out = work.W6GBUSX6 () ;

by TABLE_KEY;

var INTERNAL_ORG_REFERENCE_NO AGGREGATION_ID CIC_EXT_NUM INTEREST_TYPE_CD;

copy X_SOURCE_DETAIL_CD;

run;

but the problem is the X_SOURCE_DETAIL_CD is only filled in one of the four lines...any help?


Accepted Solutions
Solution
‎07-09-2014 08:20 AM
Super User
Super User
Posts: 7,401

Re: Proc Transpose Copy

Sorry, not sure I follow.  If you want that variable to remain as is and present on each line, then put it in the by line:

proc transpose data = TEMP.TRANSP () out = work.W6GBUSX6 () ;

by TABLE_KEY X_SOURCE_DETAIL_CD;

var INTERNAL_ORG_REFERENCE_NO AGGREGATION_ID CIC_EXT_NUM INTEREST_TYPE_CD;

run;

View solution in original post


All Replies
Solution
‎07-09-2014 08:20 AM
Super User
Super User
Posts: 7,401

Re: Proc Transpose Copy

Sorry, not sure I follow.  If you want that variable to remain as is and present on each line, then put it in the by line:

proc transpose data = TEMP.TRANSP () out = work.W6GBUSX6 () ;

by TABLE_KEY X_SOURCE_DETAIL_CD;

var INTERNAL_ORG_REFERENCE_NO AGGREGATION_ID CIC_EXT_NUM INTEREST_TYPE_CD;

run;

Regular Contributor
Posts: 229

Re: Proc Transpose Copy

thanks.. damn, that simple

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 257 views
  • 1 like
  • 2 in conversation