Creating Metadata |
In SAS/ASSIST software, metadata is either generated at startup or generated prior to startup in batch mode. When users invoke the software, the batch- generated metadata is immediately available and can be appended to the metadata that is generated at startup by the user. To use the metadata library, the profile option Use Metadata Library must be set to Yes either in the User Profile or the Master Profile.
Metadata is created in batch mode by using a SAS program. A sample program is provided with SAS/ASSIST software. The sample program is located in the SASHELP library at SASHELP.QASSIST.METADICT.SOURCE. The batch program must also contain a list of LIBNAME statements. When a library is both defined in the batch program and assigned in a user session, metadata for data sources that are located in this library is made available to the user. Conversely, if a library is defined in the batch program but not assigned in an individual user session, data sources that are located in this library are not visible to this particular user.
The batch-generated metadata and the user-generated metadata are stored together in two SAS tables, _ASTDCOL and _ASTDTAB. If the metadata is created in batch mode prior to startup, both _ASTDCOL and _ASTDTAB are automatically created in the SASUSER library the first time a user invokes the software. If the metadata is generated at startup, only the _ASTDCOL table is generated, and the user is unable to view the _ASTDTAB table.
The advantages of creating metadata in batch mode are as follows:
The use of resources is reduced when users invoke SAS/ASSIST software. If metadata is created at startup by the individual user, then the software accesses all available data in order to gather information. Creating metadata in batch mode avoids the need for each user to access remote hosts in order to examine the data.
The metadata can be customized to suit the needs of individual users and groups. You can subset metadata generation in the sample program so that users see only the metadata for the information they normally work with. This simplifies the process of searching for tables or columns.
The processing time is significantly reduced when users update metadata during a session. Creating metadata at startup can be time consuming, especially when a large number of tables are accessed or when data resides on remote hosts. Batch-generated metadata, however, is stored in two tables in a shared location. These tables are appended to the user-generated metadata.
The following figure illustrates and compares metadata creation in batch and metadata creation at startup.
Metadata Creation in SAS/ASSIST
Copyright © 2012 by SAS Institute Inc., Cary, NC, USA. All rights reserved.