Use OR condition in metadata OMSOBJ query

Make your metadata queries more versatile by checking for multiple conditions in a single pass!  When using the OR condition, remember to prefix subequent attributes with the @ symbol.  See below for testing whether a Stored Process user is in a certain set of groups:

%let MetaPerson=John Smith;

data \null;
   length obj type $256 id $20;
   obj=“omsobj:IdentityGroup?IdentityGroup[”!!
      “@Name=‘SASAdministrators’ or @Name=‘ETL Developers’]”!!
      “[MemberIdentities/Person[@Name=‘”||”&METAPERSON”||”’]]”;
   rc=metadataresolve(obj,type,id);
   if (rc) then Call symputx(‘Isamemberc’,‘Yes’);
   else Call symputx(‘Isamemberc’,‘No’);
run;

%put “Is &\MetaPerson in groups ETL developer or SAS Administrator??“;
%put ”&Isamemberc”;