Previous Page | Next Page

METALIB Procedure

Results: METALIB Procedure with the REPORT Statement


Introduction

By default, regardless of whether you specify the REPORT statement, the METALIB procedure writes a summary to the SAS log of changes that were made to the metadata. Here is an example:

NOTE: A total of 10 tables were analyzed for library "mylib".
NOTE: Metadata for 2 tables was updated.
NOTE: Metadata for 0 tables was added.
NOTE: Metadata for 7 tables matched the data sources.
NOTE: 1 other tables were not processed due to error or UPDATE_RULE.

If you specify the REPORT statement, a detailed report is written to the SAS Output window. The report provides the same summary as the SAS log, and additionally lists the changes to tables and their Column, ForeignKey, Index, KeyAssociation, and UniqueKey objects.

Some procedure arguments add information to the report:

If you specify the NOEXEC statement, the procedure does not make any of the changes to the metadata. The log and output summarize the metadata changes that would have been applied if NOEXEC had not been specified.

For information about REPORT statement syntax, see REPORT Statement.


Output Delivery System (ODS) Reports

The default report destination is a SAS output listing. In addition, you can choose to format the report with an Output Delivery System (ODS) destination, such as HTML or RTF. ODS reports are easier to read than the SAS output listing. To omit the SAS output listing, submit the ODS LISTING CLOSE statement.

For example code that produces ODS output, see Examples: METALIB Procedure.


Details in the Report

The METALIB procedure updates the attribute values of the table definition and the attribute values of associated objects to match the data in the specified SAS library, and then produces a report. Most of the report is self-explanatory. Here is more information about two of the columns in the report:

SAS Name

is the SAS name of the item described by the metadata.

  • For an index, this value is the IndexName= attribute.

  • For a column, this value is the SASColumnName= attribute.

  • For a non-primary unique key, this value is a two-part identifier in the form SASTableName.data-source-key-name.

  • For a primary unique key, this value is a two-part identifier in the form SASTableName.Primary.

  • For a foreign key, this value is a two-part identifier in the form primary-table-SASTableName.foreign-table-SASTableName.

Change

is a system-generated description of the change that was made. The description can be a single word, such as "Added" or "Deleted," or an attribute name (which indicates that the attribute's value was modified). It can also be a "Column" or a "Column Order" message, followed by the name of the column that was affected by the change. PROC METALIB changes a table's Columns association to make the metadata column order match the data source column order. Affected columns are listed separately in the report. The column order in the report indicates the new metadata column order.

Previous Page | Next Page | Top of Page