METADATA Procedure

Results: METADATA Procedure

The METADATA procedure produces output in the SAS log or in an XML file. If you do not specify the OUT= argument, the output is written to the SAS log. To send the output to an XML file, you must first submit a FILENAME statement to assign a fileref to the pathname. The file can be temporary or permanent.
In most cases, the output XML string is identical to the input XML string, with the addition of the requested values within the XML elements. XML output is mostly unformatted and difficult to read. To get a more readable representation, you can send the output to an XML file, and then open the XML file in an Internet browser such as Internet Explorer. The browser inserts line breaks between the XML elements to make them more readable. For an example of a typical output versus an output that was routed to an XML file, see Get Information about Metadata Repositories.
To use the output XML file (for example, to run reports), create an XML map, and then use an XML LIBNAME statement to read the XML file. The XML LIBNAME statement associates the XML map to the XML file so that it can be read by the XML engine as if it were a SAS data set. You can copy the contents to a SAS data set if you choose. Like the output XML file, this SAS data set can be temporary or permanent. For an example that creates a report and reads it with the XML engine, see Example: Creating a Report with the METADATA Procedure and the XML Engine. For more information about the XML engine and XML maps, see the SAS XML LIBNAME Engine: User's Guide.
The VERBOSE= argument does not affect the XML output. It causes the input XML to be written to the SAS log. For an example of the information that is written to the log, see VERBOSE Argument.