Hi Sergie89,
I would do this using a data step to find out all the libraries and them populate a list of macvars. I would then look thru that list of macvars invoking the proc metalib for each of them. Here is a quick draft of what it would look like (please note, I don't have the opportunity to test the code at the moment so it may not run AS IS but should be pretty close to it):
%MACRO LASRLibs;
data _null_;
length uri $60. name $60.;
count = metadata_getnobj("OMSOBJ:SASLibrary@?Name contains 'LASR'", 1, uri);
do i = 1 to count;
rc = metadata_getnobj("OMSOBJ:SASLibrary@?Name contains 'LASR'", i, uri);
rc = metadata_getattr(uri, 'Name', name);
call symputx(cats('LIBRARY_', i), name);
call symputx('LIBRARY_COUNT', i);
end;
run;
%DO I = 1 %TO &LIBRARY_COUNT.;
proc metalib;
omr (LIBRARY="&&LIBRARY_&I..");
update_rule = (delete noadd noupdate);
report = ( type=summary );
/*noexec;*/
run;
%END;
%MEND;