I have emailed this simple code up & down the east coast. My memory isnt as good as it use to be, so I also have a copy nearby to implement when onsite. This updates the metadata within the specified library (and delete tables/info if it no longer exists in the file system corresponding to this library).
proc metalib;
omr (library="libname" repname="Foundation");
update_rule=(delete);
run;
Another item I found useful this week was the addition of one line to select the specific table you need to update.
proc metalib;
omr (library="libname" repname="Foundation");
select(table);
update_rule=(delete);
run;

4 Comments
Hi,
I couldn't execute the procedure metalib in batch mode. It works perfectly in windowing mode, but not in interactive and batch modes.
Logged into SAS environment in UNIX using -nodms and found not working.
Would you please suggest to overcome this?
Kind Regards,
AnjiReddy.
You must add the metaserver metauser metaport options in a options statement.
Pingback: Top 5 Tips from a Popular SAS BI Blog - The SAS Training Post
For SAS Enterprise Guide users, you can download a new task that makes it easy to update library metadata. See more information at: http://blogs.sas.com/sasdummy/index.php?/archives/3-Updating-library-metadata,-the-fun-and-easy-way.html.