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

Hello,

I am stuck on how to proceed on the below. My original data looks like this:

 

aabb
110
1115
1625

 

 

I would like to transform the above data to something like the below:

 

aabbnewvar
1101
1102
1103
1104
1105
1106
1107
1108
1109
11010
111511
111512
111513
111514
111515
162516
162517
162518
162519
162520
162521
162522
162523
162524
162525

 

Any advice would be highly appreciated..

 

Regards,

 

Tina

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Jagadishkatam
Amethyst | Level 16
data have;
input aa bb;
cards;
1 10
11 15
16 25
;

data want;
set have;
do newvar=aa to bb;
output;
end;
run;
Thanks,
Jag

View solution in original post

2 REPLIES 2
Jagadishkatam
Amethyst | Level 16
data have;
input aa bb;
cards;
1 10
11 15
16 25
;

data want;
set have;
do newvar=aa to bb;
output;
end;
run;
Thanks,
Jag

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
  • 2 replies
  • 759 views
  • 4 likes
  • 2 in conversation