Previous Page | Next Page

Using GetMetadataObjects to Get All Metadata of a Specified Metadata Type

Expanding a GetMetadataObjects Request to Include Additional Repositories

The GetMetadataObjects method supports the OMI_DEPENDENCY_USES (8192) and OMI_DEPENDENCY_USED_BY (16384) flags to enable you to get objects from other repositories.

The behavior of these flags has changed between SAS 9.1.3 and SAS 9.2. In SAS 9.1.3, the flags specified to include objects from repositories that existed either above or below the specified repository in the repository chain. In SAS 9.2, their behavior is much simpler and is as follows:

See the following topics for examples of how the flags are used:


Example of a GetMetadataObjects Request That Includes All Public Repositories

The following is an example of a GetMetadataObjects request that sets the OMI_DEPENDENCY_USES (8192) flag:

<GetMetadataObjects>
<!-- Reposid parameter specifies host repository -->
   <Reposid>A0000001.A53TPPVI</Reposid>
   <Type>PhysicalTable</Type>
   <Objects/>
   <NS>SAS</NS>
 <!-- Specify OMI_DEPENDENCY_USES (8192) flag -->
   <Flags>8192</Flags>
   <Options/>
</GetMetadataObjects>

This request returns all objects of the PhysicalTable metadata type from the specified repository and all other public repositories.

In the request, note the following:


Example of a GetMetadataObjects Request That Includes All Project Repositories

A GetMetadataObjects request can be expanded to include objects from all project repositories by setting the OMI_DEPENDENCY_USED_BY (16384) flag. The following is an example of a GetMetadataObjects request that sets the OMI_DEPENDENCY_USED_BY (16384) flag:

<GetMetadataObjects>
<!-- Reposid parameter specifies host repository -->
   <Reposid>A0000001.A53TPPVI</Reposid>
   <Type>PhysicalTable</Type>
   <Objects/>
   <NS>SAS</NS>
 <!-- Specify OMI_DEPENDENCY_USED_BY (16384) flag -->
   <Flags>16384</Flags>
   <Options/>
</GetMetadataObjects>

In the request, note the following:


Example of a GetMetadataObjects Request That Includes All Repositories

To get objects from all repositories that are registered on the SAS Metadata Server (foundation, custom, and project), set both the OMI_DEPENDENCY_USES (8192) and OMI_DEPENDENCY_USED_BY (16384) flags.

The following is an example of a GetMetadataObjects request that gets objects of metadata type PhysicalTable from all repositories:

<GetMetadataObjects>
<!-- Reposid parameter specifies host repository -->
   <Reposid></Reposid>
   <Type>PhysicalTable</Type>
   <Objects/>
   <NS>SAS</NS>
 <!-- Specify OMI_DEPENDENCY_USES (8192) and 
OMI_DEPENDENCY_USED_BY (16384) flags -->
   <Flags>24576</Flags>
   <Options/>
</GetMetadataObjects>

In the request, note the following:

Previous Page | Next Page | Top of Page