BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Filipvdr
Pyrite | Level 9

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?

1 ACCEPTED SOLUTION

Accepted Solutions
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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;

Filipvdr
Pyrite | Level 9

thanks.. damn, that simple

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 2 replies
  • 3332 views
  • 1 like
  • 2 in conversation