Previous Page | Next Page

Managing Table Metadata

Assessing Potential Changes in Advance

Before you use PROC METALIB to update existing table metadata, it is a good idea to execute the procedure with the NOEXEC and REPORT statements. The NOEXEC statement tells the procedure not to actually add, update, or delete any metadata. The REPORT statement tells the procedure to create a report that explains what actions it would have taken if the NOEXEC statement had not been present. If you want to make all of the changes that are shown in the report, you can then remove the NOEXEC statement and rerun the procedure to update the metadata.

The following example shows how to use the NOEXEC and REPORT statements to assess potential metadata changes:

ods html "myfile";
proc metalib;
omr (library="SAS91 lib" repname="Meta Proc repos" );
update_rule=(delete);
noexec;
report;
run;

Note:   The UPDATE_RULE statement tells the procedure to delete table definitions for any tables that have been deleted from the library. For more information about this statement, see Changing the Update Rule.  [cautionend]

Here is the resulting SAS log:

55   proc metalib;
56   omr (library="SAS91 lib"  repname="Meta Proc repos" );
57   update_rule=(delete);
58   noexec;
59   report;
60   run;

NOTE: A total of 22 tables were analyzed for library "SAS91 lib".
NOTE: NOEXEC statement in effect.  No Metadata changes applied.
NOTE: Metadata for 4 tables would have been updated.
NOTE: Metadata for 2 tables would have been deleted.
NOTE: Metadata for 2 tables would have been added.
NOTE: Metadata for 13 tables matched the data sources.
NOTE: 0 other tables were not processed due to error or UPDATE_RULE.
NOTE: PROCEDURE METALIB used (Total process time):
      real time           31.26 seconds
      cpu time            8.12 seconds

SAS output is the default. This example specifies ODS output. Specifying ODS produces reports in both ODS and SAS output formats unless you specify the following to suppress SAS output:

ods listing close;

Here is the resulting ODS output:

[Summary Statistics for potential changes by PROC METALIB]

[PROC METALIB output showing the tables to be updated and the change to be made]

[PROC METALIB output showing tabular display of tables to be deleted and tables to be added.]

Previous Page | Next Page | Top of Page