BookmarkSubscribeRSS Feed
Babloo
Rhodochrosite | Level 12

I've the following datasets in SAS and for the reporting I use only the previous month datasets (test_201801).

 

test_201801

test_201712

test_201711

test_201710

test_201709

.

.

test_201501

 

Now there going to be slight change in the reporting and it was to find all the historical datasets from previous month and to append those datasets and make it as final dataset "test_final". All the datasets are in similar fashion and it has ~10K records each.

 

Appreciate if someone of you guide me to accomplish this exercise.

 

3 REPLIES 3
Miracle
Barite | Level 11

Hi, is this what you are wanting to do? Set All Datasets in a library in a datastep

Babloo
Rhodochrosite | Level 12

Thank you for pointing me in right direction. Now how can I write a code if the requirement has changed like keeping "test_201711" dataset as base and I've to append the datasets (dataset test_201712,dataset test_201801) to the base dataset test_201711?

kiranv_
Rhodochrosite | Level 12

if you can give an example( 5 to 10 rows) input dataset and output dataset, it will be very easy for help.

 

 

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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
  • 3 replies
  • 739 views
  • 0 likes
  • 3 in conversation