DATA Step, Macro, Functions and more

merge

Reply
Super Contributor
Posts: 673

merge

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;
Respected Advisor
Posts: 3,799

Re: merge

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.
Super Contributor
Posts: 673

Re: merge

Posted in reply to data_null__
Yes what you interpreted is right,
I have notes_01 to notes_09 and so on.
Respected Advisor
Posts: 3,799

Re: merge

Ok but how are the data sets related?
Ask a Question
Discussion stats
  • 3 replies
  • 90 views
  • 0 likes
  • 2 in conversation