BookmarkSubscribeRSS Feed
Tejaswini3
Obsidian | Level 7
I want to combine petest and desc coloumn one below the other
E g ,
Abdominal
No
Yes
Cardiovascular system
No
Yes
6 REPLIES 6
fja
Lapis Lazuli | Level 10 fja
Lapis Lazuli | Level 10

Looks like stacking cols ... this is available as a point and click task in Studio under Tasks->Data->Stack/Split Columns.

Generates something like this:

data work.TestData;  
   input Col1$ Col2$ Col3 $;  
   datalines;  
A B C 
D E F 
; 
run; 
 
data work.__tmp__;  
	set WORK.TESTDATA;  
	_Case_=_n_;  
run;  
  
proc transpose data=work.__tmp__ out=work.TestOut(drop=_Label_   
		rename=(col1=StackedCol)) name=_Level_;  
	var Col1 Col2;  
	by _Case_;  
run;  
  
proc delete data=WORK.__tmp__;  
run;
Tejaswini3
Obsidian | Level 7
Without transpose statement, pls write code to solve
fja
Lapis Lazuli | Level 10 fja
Lapis Lazuli | Level 10

@Tejaswini3 wrote:
Without transpose statement, pls write code to solve

Why is that? Than you needed to detail your problem a bit. ... let's say just to motivate people. 😉

 

Err ... being with it: My observation is that you keep on asking the same questions over and over (e.g. here and here ). You got answered there, though you have neither marked these threads as solved nor detailed what was missing to an acceptable solution. ... sooo, could you help us a bit, please?

Tejaswini3
Obsidian | Level 7
Can you please write full code and let me know
Kurt_Bremser
Super User

If you need someone to do your work for you, you should hire a consultant.

 

And you have neither answered my question, nor provided usable data.

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
  • 6 replies
  • 825 views
  • 1 like
  • 3 in conversation