Previous Page | Next Page

DATA Step Functions for Reading and Writing Metadata

Introduction to DATA Step Functions for Reading and Writing Metadata


What Are the DATA Step Functions for Reading and Writing Metadata?

These DATA step functions enable an administrator to set or return information about attributes, associations, and properties from metadata objects.

Name Description
METADATA_DELASSN
Deletes all objects that make up the specified association
METADATA_DELOBJ
Deletes the first object that matches the specified URI
METADATA_GETATTR
Returns the value of the specified attribute for specified object
METADATA_GETNASL
Returns the nth association of the specified object
METADATA_GETNASN
Returns the nth associated object of the specified association
METADATA_GETNATR
Returns the nth attribute on the object specified by the URI
METADATA_GETNOBJ
Returns the nth object that matches the specified URI
METADATA_GETNPRP
Returns the nth property of the specified object
METADATA_GETNTYP
Returns the nth object type on the metadata server
METADATA_GETPROP
Returns the specified property of the specified object
METADATA_NEWOBJ
Creates a new metadata object
METADATA_PATHOBJ
Returns the Id and Type attributes of the specified folder object
METADATA_PAUSED
Determines whether the metadata server is paused
METADATA_PURGE
Purges the specified URI
METADATA_RESOLVE
Resolves a URI into an object on the metadata server
METADATA_SETASSN
Modifies an association list for an object
METADATA_SETATTR
Sets the specified attribute for the specified object
METADATA_SETPROP
Sets the specified property for the specified object
METADATA_VERSION
Returns the metadata server model version number


Referencing a Metadata Object with a URI

When you use a metadata DATA step function for reading and writing metadata, you specify an object by using a URI, which is a concept from SAS Open Metadata Architecture. For more information, see Metadata Object Identifiers and URIs. Here are examples for the DATA step functions for reading and writing metadata:

ID

omsobj: A57DQR88.AU000003
type/ID

omsobj: LogicalServer/A57DQR88.AU000003
type?@attribute='value'

omsobj: LogicalServer?@Name='SASApp - OLAP Server'

Notes:


Comparison of DATA Step Functions to Metadata Procedures

The METAOPERATE procedure and the METADATA procedure perform some of the same tasks as the DATA step functions for reading and writing metadata. These language elements can query metadata for reports, or make changes to specified objects.

PROC METAOPERATE has much simpler syntax and is easy to use. However, it supports a narrow range of tasks.

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 kind of ODS reports as you can with PROC METADATA. Instead of writing the output to an XML data set, you execute the DATA step within a macro, and assign macro variables to the returned values. Those variables become the columns in an output data set. 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.

Previous Page | Next Page | Top of Page