proc psmatch data=psm region=cs;
where &outcome ne .;
class FLAG districtname SCHOOLNAME ;
psmodel FLAG(Treated="Y")= &exactvar &predictors;
match method=greedy(k=1)/*(order=random)*/ exact=districtname stat=lps caliper=&caliper;
output out(obs=match)=outgs lps=_Lps matchid=_matchID;
run;
proc sort data=outgs;by _matchID;run;