BookmarkSubscribeRSS Feed
SASPhile
Quartz | Level 8
I have 90 files to merge.
is it a good practice to merge them all at once?please advise

%macro mrge;
data abc;
merge ctm_comb.combine_oneperc(in=a)
%do i= 1 %to 9;
source.Complaint_main_%sysfunc(putn(&i,z2.))
flip08.flip_notes_%sysfunc(putn(&i,z2.)) flip08.flip_plan_%sysfunc(putn(&i,z2.))
flip08.flip_contract_%sysfunc(putn(&i,z2.)) flip08.flip_category_%sysfunc(putn(&i,z2.))
flip08.flip_switch_%sysfunc(putn(&i,z2.)) flip08.flip_cms_%sysfunc(putn(&i,z2.))
flip08.flip_ctrcttrk_%sysfunc(putn(&i,z2.)) flip08.flip_stat_%sysfunc(putn(&i,z2.))
flip08.flip_issue_%sysfunc(putn(&i,z2.))
%end;;
by complaint_id;
if a;
run;
%mend mrge;
%mrge;
3 REPLIES 3
data_null__
Jade | Level 19
This may be a good change for you to do some performance testing.

One might say, if it works and you don't need to do too often "good enough".

However, from the names of your data I might conclude that there are only 10 data sets in a MERGE dimension, _main_ _notes_ _plan_ _contract_... _issues_
and 9 in a SET dimension where _NOTES_01-_NOTES_09 could be concatenated into one data set. Just a guess.

If you care to share more information about the data that would be helpful.
SASPhile
Quartz | Level 8
Yes what you interpreted is right,
I have notes_01 to notes_09 and so on.
data_null__
Jade | Level 19
Ok but how are the data sets related?

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
  • 590 views
  • 0 likes
  • 2 in conversation