| Example: Using the INFOMAPS Procedure and the Information Maps Engine |
To register the tables in a SAS Metadata Repository, you need to use the METALIB procedure. The METALIB procedure synchronizes table definitions in a metadata repository with current information from the physical library data source. For more information about the METALIB procedure, see the SAS Language Interfaces to Metadata.
The following code registers the tables using the METALIB procedure:
/* Use the library object defined in the SAS Metadata Repository */ /* to obtain all accessible table metadata from the data source */ /* to create table metadata in the metadata repository. */ proc metalib; omr (library="HR"); select("empinfo" "jobcodes" "salary"); /* Create a summary report of the metadata changes. */ report; run;
Note: If you run the METALIB procedure code more than once,
your output will be different from what is shown. ![[cautionend]](../../../../common/61991/HTML/default/images/cautend.gif)
13 /* Use the library object defined in the SAS Metadata Repository */
14 /* to obtain all accessible table metadata from the data source */
15 /* to create table metadata in the metadata repository. */
16 proc metalib;
17 omr (library="HR");
18 select("empinfo" "jobcodes" "salary");
19
20 /* Create a summary report of the metadata changes. */
21 report;
22 run;
NOTE: A total of 3 tables were analyzed for library "HR".
NOTE: Metadata for 0 tables was updated.
NOTE: Metadata for 3 tables was added.
NOTE: Metadata for 0 tables matched the data sources.
NOTE: 0 tables listed in the SELECT or EXCLUDE statement were not found
in either the metadata or the data source.
NOTE: 0 other tables were not processed due to error or UPDATE_RULE.
NOTE: PROCEDURE METALIB used (Total process time):
real time 1.60 seconds
cpu time 0.90 seconds
Output from the METALIB Procedure
The METALIB Procedure
Summary Report for Library HR
Repository Foundation
Metadata Summary Statistics
Total tables analyzed 3
Tables Updated 0
Tables Added 3
Tables matching data source 0
Tables not found 0
Tables not processed 0
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.