Help using Base SAS procedures

have first year and last year in one row. how do i make a panel?

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 102
Accepted Solution

have first year and last year in one row. how do i make a panel?

hi i have a data

company name first year last year

ibm                      2002      2005

apple                   2004      2007

 

how do i make this as below?

 

ibm 2002

ibm 2003

ibm 2004

ibm 2005

apple 2004

apple 2005

apple 2006

apple 2007

 

thanks so much in advance


Accepted Solutions
Solution
‎12-01-2016 02:58 PM
Super User
Posts: 17,813

Re: have first year and last year in one row. how do i make a panel?

Data want;

set have;

 

Do year = first_year to last_year;

output;

end;

 

Run;

View solution in original post


All Replies
Solution
‎12-01-2016 02:58 PM
Super User
Posts: 17,813

Re: have first year and last year in one row. how do i make a panel?

Data want;

set have;

 

Do year = first_year to last_year;

output;

end;

 

Run;

Frequent Contributor
Posts: 102

Re: have first year and last year in one row. how do i make a panel?

thank you so much Reeza!
☑ This topic is SOLVED.

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

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