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