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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1127 views
  • 4 likes
  • 2 in conversation