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

Good morning.

 

I have 4 separate quarterly files with the same 10 columns in each. 

 

work.Qtr1_Sales

work.Qtr2_Sales

work.Qtr3_Sales

work.Qtr4_Sales.

 

I want to create one file that has all of the data showing Qtr2 data below Qtr1. Qtr3 data below Qtr2 etc. 

 

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
gamotte
Rhodochrosite | Level 12

Hello,

 

data want;
set qtr1_sales qtr2_sales qtr3_sales qtr4_sales;
run;

View solution in original post

6 REPLIES 6
anweinbe
Quartz | Level 8

Paige, 

 

Pardon my ignorance but I'm having trouble making the code work using the Append. I must be missing something simple. 

PaigeMiller
Diamond | Level 26

What code are you using?

--
Paige Miller
gamotte
Rhodochrosite | Level 12

Hello,

 

data want;
set qtr1_sales qtr2_sales qtr3_sales qtr4_sales;
run;
PaigeMiller
Diamond | Level 26

@gamotte wrote:

Hello,

 

data want;
set qtr1_sales qtr2_sales qtr3_sales qtr4_sales;
run;

The reason I recommend PROC APPEND is that it is much faster than use the SET statement; this can make a difference if these are huge data sets.

--
Paige Miller
gamotte
Rhodochrosite | Level 12
Good point, I overlooked this difference in performance. The drawback i saw with proc append is the necessity to use as many proc appends as there are datasets to append. A macro can be used though.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 6 replies
  • 898 views
  • 3 likes
  • 3 in conversation