Hello team,
I have inherited a code as below:
%mbrreconcile( indata =work.somedataset, fld_patientNum = , fld_patientmcdid = , fld_patientName = mbrName, fld_patientLastName = mbrLastNae, ...................... .......................... );
They told me that this macro matches the member. How could this macro do such a task?
I have always learned for matching to use joins. I wonder what syntax this is.
Can someone kindly please provide some instruction?
Regards,
blueblue
Yes, it should be macro on its own, but you only have the CALL here, not the DEFINITION.
To assist you with the macro, we must see that definition.
Please show us the code in the macro.
PaigeMiller,
I have shown the code to you. It is exactly like what you see.
Regards,
blueblue
@GN0001 - What you've shown us is the code that calls the macro. What we need to see is the code that creates the macro in the first place.
@SASKiwi is correct.
We need to see the code inside the macro, not the code that calls the macro.
You ask about %mbrmatch but that is not the name of the macro you are calling. One suspects that your %mbrmatch may actually call the definition of one or more macros such as the one you show. If it doesn't have the definition code for the other macros you need to do some sleuthing.
Where is the code that starts
%macro mbrreconcile ( )
and ends with
%mend;
that is what defines the macro. If you have this macro in an Autocall macro library, which seems likely if you don't see the macro definition in the code you run, then you need to run
proc options option=SASautos;
run;
Which should show the path to any autocall libraries. Search in those folders for the definition of the macro you are using. This option would explain why you don't need to run the macro definition.
OR it may be called in your Autoexec.SAS for each session started.
Hello team,
Thanks for correcting me.
Mbrmatch was inside a macro, since it Mbrmatch had %, I thought it is a macro by itself.
This is what I have:
%macro get_data;
%do i = 1 %to &lst.
proc sql;
select strip(basefile) into: INFILEName from myfile where index=&i;
select strip(basefile) into: INFILEPath from myfile where index=&i;
quit;
%mbrmatch (indata = work.somedata,
fld_mbrID = ,
fld_mbrName= ,
fld_mbrLastName= ,
............................
);
proc sql;
create table thistable as
select ................
quit;
proc sql;
create table thattable as
select....
quit;
proc append
run;
%mend get_data;
%get_data;
quit;
I appreciate your response.
Regards,
Blueblue
We still need to see the code defining the MBRMATCH macro to know what it does.
Yes, it should be macro on its own, but you only have the CALL here, not the DEFINITION.
To assist you with the macro, we must see that definition.
hello kert,
What do you mean by saying: "Yes, it should be macro on its own,"?
What is the definition?
That is the code I have in all the program for %mbr_match.
Regards,
blueblue
Hello team member,
I was told that it is too complicated for me and I don't need to learn it. They told me that it was written by a member from SAS institute.
Regards,
Blueblue
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.