Comparison of DATA Step Functions to Metadata Procedures

The METADATA procedure can perform some of the same tasks as the DATA step functions for reading and writing metadata. Both language elements can query metadata for reports, or make changes to specified objects.
PROC METADATA can submit any method that is supported by the DoRequest method of the SAS Open Metadata Interface, including all methods of the IOMI class, and the Status method of the IServer class. PROC METADATA produces XML output. By using the XML LIBNAME engine and ODS, you can create reports.
In general, the DATA step functions perform the same tasks as the PROC METADATA methods. However, with the DATA step functions, you do not have to understand the XML hierarchy. You can create the same type of ODS reports as you can with PROC METADATA. Instead of writing the output to an XML data set, you use the DATA step to create an output SAS data set directly. See how these two examples create similar reports from their output: Example: Creating a Report with the DATA Step and Example: Creating a Report with the METADATA Procedure and the XML Engine.