The SAS Metadata Model
defines a UsageVersion attribute for all metadata types to enable
version management of metadata definitions. A UsageVersion value consists
of a major version number (0<=major<=999), a minor version number
(0<=minor<=99), and a build number (0<=build<=9999). The
build number is reserved for future use. UsageVersion values are
persisted in metadata as a double value in the form
MMMmmbbbb.0.
Major version zero is
reserved to indicate that an object was created prior to SAS 9.2,
or that the object is not versioned. Most SAS 9.3 objects are versioned
as 1.0, unless there is a reason (such as an existing versioning scheme)
to start at a higher version number.
The following examples
show how the comparison operators described in AttributeCriteria Component can be used
to specify version criteria for the UsageVersion attribute.
In the <XMLSELECT
search="
criteria"/> search
string, the UsageVersion value can be expressed without the leading
zeros in the
MMM part of the
MMMmmbbbb.0 format. These three examples all
refer to version 1.1:
@UsageVersion LE '1010000.0'
@UsageVersion LE '01010000.0'
@UsageVersion LE '001010000.0'
The following are examples
of search strings that execute common queries:
-
Find version 0 or non-versioned
objects:
<XMLSELECT search="*[@UsageVersion EQ '0.0']"/>
-
Find version 1.0 objects:
<XMLSELECT search="*[@UsageVersion EQ '1000000.0']"/>
-
Find version 1.1 objects:
<XMLSELECT search="*[@UsageVersion EQ '1010000.0']"/>
-
Find version 1.10 objects:
<XMLSELECT search="*[@UsageVersion EQ '1100000.0']"/>
-
Find all major version 1 objects
less than or equal to version 1.1:
<XMLSELECT search="*[@UsageVersion
GE '1000000.0' and @UsageVersion LE '1010000.0' ]"/>
-
Find all major version 1 objects:
<XMLSELECT search="*[@UsageVersion GE '1000000.0' and @UsageVersion
LT '2000000.0']"/>