Previous Page | Next Page

Adding Metadata Objects

Example of an AddMetadata Request That Creates an Object and an Association to an Existing Object

The following AddMetadata request creates a ResponsibleParty object, and then associates it with the SASLibrary object created in Example of an AddMetadata Request That Creates an Application Metadata Object. The ResponsibleParty metadata type is used to associate a set of Person objects with a role or responsibility. This ResponsibleParty object is created with the role of "Owner".

<AddMetadata>
 <Metadata>
   <ResponsibleParty Name="LibraryAdministrator" 
      Desc="NW Region Sales Data" 
      Role="Owner">
     <Objects>
       <SASLibrary ObjRef="A53TPPVI.A1000001"/>
     </Objects>
   </ResponsibleParty>
 </Metadata>
 <Reposid>A0000001.A53TPPVI</Reposid>
 <NS>SAS</NS>
 <Flags>268435456</Flags>
 <Options/>
</AddMetadata>

In this method call, the <REPOSID>, <NS>, and <FLAGS> elements contain the same values as in Example of an AddMetadata Request That Creates an Application Metadata Object. In the <METADATA> property string, note the following:

Here is an example of the output returned by the SAS Metadata Server:

<!-- Using the ADDMETADATA method. -->

<ResponsibleParty Name="LibraryAdministrator" Desc="NW Region Sales Data" 
  Role="Owner" Id="A53TPPVI.A2000001">
  <Objects>
    <SASLibrary ObjRef="A53TPPVI.A1000001"/>
  </Objects>
</ResponsibleParty>

The output string mirrors the input string with the exception that a two-part metadata object identifier is assigned to the ResponsibleParty object.

Previous Page | Next Page | Top of Page