Previous Page | Next Page

Adding Metadata Objects

Example of an AddMetadata Request That Creates an Application Metadata Object

The following AddMetadata request creates an application metadata object describing a SAS library. A SAS library is represented in the SAS Metadata Model by the SASLibrary metadata type.

<AddMetadata>
 <Metadata>
   <SASLibrary 
      Name="NW Sales" 
      Desc="NW region sales data" 
      Engine="base"
      IsDBMSLibname="0" 
      Libref="nwsales"
      IsPreassigned="0"
      PublicType="Library"/>
 </Metadata>
 <Reposid>A0000001.A53TPPVI</Reposid>
 <NS>SAS</NS>
 <Flags>268435456</Flags>
 <Options/>
</AddMetadata>

In this method call, consider the following:

Here is an example of the output returned by the SAS Metadata Server:
<!-- Using the ADDMETADATA method. -->

<SASLibrary Name="NW Sales" Desc="NW region sales data" Engine="base" 
  IsDBMSLibname="0" Libref="nwsales" IsPreassigned="0" PublicType="Library"
Id="A53TPPVI.A1000001"/>

The output string mirrors the input string, with the exception that a two-part object instance identifier is assigned to the new object in the form:

Reposid.Objectid

Reposid is the unique repository identifier. Objectid is the unique object instance identifier. You will use this unique object identifier any time that you need to reference the metadata object. In Example of an AddMetadata Request That Creates an Object and an Association to an Existing Object, this identifier is used to create an association to the object.

Previous Page | Next Page | Top of Page