To get all of XML attributes
of the requested objects, set the OMI_ALL_SIMPLE (8) flag in the
GetMetadata request. The OMI_ALL_SIMPLE flag gets only an object's
attributes; it does not get any associations. However, it will get
the attributes for the specified object and all associated objects
requested in the INMETADATA parameter and by other GetMetadata flags.
The following is an example of how the OMI_ALL_SIMPLE flag is specified:
<GetMetadata>
<Metadata>
<Column Id="A5TJRDIT.B700002E">
<Table/>
</Column>
</Metadata>
<NS>SAS</NS>
<!--OMI_ALL_SIMPLE flag -->
<Flags>8</Flags>
<Options/>
</GetMetadata>
Note the similarity
of this request to example shown in
Basic GetMetadata Request.
-
The <METADATA> element specifies
a metadata type (Column), an object instance identifier, and an association
name (Table) to expand. The association name is optional; it is not
a required part of the request.
-
The <NS> parameter specifies
the SAS namespace.
-
The <FLAGS> element specifies
the OMI_ALL_SIMPLE (8) flag.
Here is an example of
the output returned by the SAS Metadata Server:
<!-- Using the GETMETADATA method. -->
<Column Id="A5TJRDIT.B700002E" Name="IDNUM" Desc="Identification Number"
SASColumnType="N" IsNullable="1" BeginPosition="0" ChangeState="" ColumnLength="8"
ColumnName="IDNUM" ColumnType="0" EndPosition="0" IsDiscrete="1" IsHidden="0"
LockedBy="" MetadataCreated="10Jan2011:21:20:36" MetadataUpdated="14Jan2011:22:37:17"
PublicType="Column" SASAttribute="" SASColumnLength="8" SASColumnName="IDNUM"
SASExtendedColumnType="" SASExtendedLength="0" SASFormat="SSN11." SASInformat="F11."
SASPrecision="0" SASScale="0" SortOrder="" SummaryRole="" UsageVersion="1000000">
<Table>
<PhysicalTable Id="A5TJRDIT.B200000J" Name="EMPINFO" Desc="" ChangeState=""
DBMSType="" IsCompressed="0" IsDBMSView="0" IsEncrypted="0" IsHidden="0"
LockedBy="" MemberType="DATA" MetadataCreated="10Jan2011:21:20:36"
MetadataUpdated="14Jan2011:22:37:17" NumRows="-1" PublicType="Table"
SASTableName="EMPINFO" TableName="EMPINFO" UsageVersion="1000000"/>
</Table>
</Column>
The GetMetadata method
gets all of the attributes of the specified Column object, including
the names of attributes for which values have not been defined. It
also gets all of the attributes of the PhysicalTable object that is
returned through the Table association name.
To limit the output
to attributes that have values defined, you can also set the OMI_SUCCINCT
(2048) flag. Add the value of OMI_SUCCINCT to OMI_ALL_SIMPLE (2048
+ 8 = 2056) and specify the sum in the FLAGS parameter. The OMI_SUCCINCT
flag instructs the SAS Metadata Server to omit any attributes that
do not contain a value or that contain a null value from the output.