DATA Step, Macro, Functions and more

Re: Do loop

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 108
Accepted Solution

Re: Do loop

Hi , 

 

Thanks for your reply , but i was looking for a output like this ..

 

Obs name Valu1 name1 Value2
1 Planttype1 11 Planttype2 22
2 Planttype1 12 Planttype2 23
3 Planttype1 13 Planttype2 24


Accepted Solutions
Solution
‎11-02-2015 01:40 PM
Trusted Advisor
Posts: 1,204

Re: Do loop

Try this.

 

data want;
retain name valu1 name1 value2;
name='Plantype1';
name1='Plantype2';
input valu1 value2;
datalines;
11 22
12 23
13 24
;
run;

View solution in original post


All Replies
Solution
‎11-02-2015 01:40 PM
Trusted Advisor
Posts: 1,204

Re: Do loop

Try this.

 

data want;
retain name valu1 name1 value2;
name='Plantype1';
name1='Plantype2';
input valu1 value2;
datalines;
11 22
12 23
13 24
;
run;

Frequent Contributor
Posts: 108

Re: Do loop

Thank you So much "

 

 

Community Manager
Posts: 291

Re: Do loop

[ Edited ]

Hi @pearsoninst

 

Thanks for your question and for being part of SAS Support Communities. I'm glad you found help with your question.

 

I've moved your question to this forum as it may help others. Thanks! 

Best,

Lainie

☑ This topic is SOLVED.

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

Discussion stats
  • 3 replies
  • 243 views
  • 2 likes
  • 3 in conversation