Previous Page | Next Page

Example: Using the INFOMAPS Procedure and the Information Maps Engine

Step 3: Register Data Using the METALIB Procedure

To register the tables in a SAS Metadata Server, you need to use the METALIB procedure. The METALIB procedure synchronizes table definitions in a metadata server 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 Server     */
/* to obtain all accessible table metadata from the data source  */
/* to create table metadata in the metadata server.              */
proc metalib;
     omr (library="Demo_V92_Doc");
     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]

Log for the METALIB Procedure

11   /* Use the library object defined in the SAS Metadata Server     */
12   /* to obtain all accessible table metadata from the data source  */
13   /* to create table metadata in the metadata server.              */
14   proc metalib;
15        omr (library="HR");
16        select("empinfo" "jobcodes" "salary");
17        /* Create a summary report of the metadata changes. */
18        report;
19   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           2.85 seconds
      cpu time            0.49 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


    -----------------------------------------------------------------------------------------
                                          Tables Added
    -----------------------------------------------------------------------------------------


    Metadata Name                       Metadata ID          SAS Name

    EMPINFO                             A5U6VCF4.B80003T3    EMPINFO
    JOBCODES                            A5U6VCF4.B80003T4    JOBCODES
    SALARY                              A5U6VCF4.B80003T5    SALARY

Previous Page | Next Page | Top of Page