%rjoe(branchP>=0);/*No working*/
There is no such thing as calling a macro where you insert the > sign where the equal sign ought to go. Macro arguments can't work this way, you must have the macro variable name followed by an equal sign. Do not try to MIX and MATCH data step syntax in your macro call.
Also, when your macro runs, it must produce valid working SAS code.
So, when your macro runs, it seems like you want it to produce
where branch in (>=0)
which is not valid working SAS code.
If you want the macro calls to produce legal SAS code, something like this (and there are other ways to accomplish the same)
%macro rjoe(branchP=);
PROC SQL;
create table outcome as
select *
from tbl
where branch &branchP
;
QUIT;
proc print noobs;run;
%mend;
%rjoe(branchP = %str(eq 100))
%rjoe(branchP = %str(eq 200))
%rjoe(branchP = %str(eq 300))
%rjoe(branchP = %str(ge 0))
--
Paige Miller