Previous Page | Next Page

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. 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. If you specify the VERBOSE argument, the input XML is written to the SAS log. For example output, see Request the Metadata for One Object.

If you process the output in a subsequent DATA step, and the processing updates an _INFILE_ buffer variable in place (for example, _infile_=tranwrd(_infile_, 'old', 'new'), the resulting XML string might be truncated at 80 characters. To avoid truncation, create a temporary variable instead of the _INFILE_ buffer variable. Set the length of the temporary variable (for example, with a LENGTH statement within the DATA step).

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.

To use the output XML file (for example, to run reports), submit an XML LIBNAME statement that assigns an XML map. The XML LIBNAME statement imports the XML file to a SAS data set. Like the output XML file, this data set can be temporary or permanent. For more information, 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.

Previous Page | Next Page | Top of Page