Format
UPDATE COMPOSITE [ qualifier ] composite-name
[ AUDIT IS /*text*/ ]
1 – Parameters
1.1 – composite-name
Specifies the collection, record, or field you are updating.
1.2 – text
Adds information to the history list entry. Valid delimiters are
/* */ or double quotation marks (" ").
You can use Japanese to document comments in the AUDIT clause for
a field. To do this, use the SET CHARACTER_SET command, and set
the character_set of the session to DEC_KANJI.
2 – Qualifiers
2.1 /CLOSURE
Format options:
/CLOSURE=TO_BOTTOM
/NOCLOSURE (default)
Specifies whether CDO updates additional elements. Specifying the
/CLOSURE=TO_BOTTOM qualifier updates all children of a reserved
element, unless the element is a child of an element outside the
area defined by the CLOSURE keyword.
3 – Description
The UPDATE command allows you to attach more recent versions of
elements to your own collections, records, or fields. In this
way, you can access the work of others in your working group.
Before you issue the UPDATE command, you must reserve the
elements you wish to update. The SHOW RESERVATIONS command
indicates whether this condition exists.
When you issue the UPDATE command, the action that occurs depends
on the keyword you specified in the DEFAULT_ATTACHMENT clause of
the DEFINE CONTEXT or the CHANGE CONTEXT command for your current
context. The following table lists the keywords and behaviors
associated with them:
DEFAULT_
ATTACHMENT
Keyword Behavior
LATEST Detaches the version currently attached and
attaches the latest version, whether checked in
or ghost. This keyword is the default attachment
method.
LATEST_CHECKIN Detaches the version currently attached and
attaches the version most recently checked in.
SPECIFIC_ Does not detach the version currently attached.
VERSION
The UPDATE command cannot attach a ghost version created with
another context. The UPDATE command also cannot attach a checked-
in version unless you have write privilege for the partition
where the version resides.
4 – Examples
1.CDO> DEFINE CONTEXT BUILD_SYSTEM_CONTEXT
cont> BASE_PARTITION IS FIRST_BASELEVEL TOP IS COMPILER_C
cont> DEFAULT_ATTACHMENT IS LATEST_CHECKIN.
.
.
.
CDO> UPDATE COLLECTION COMPILER_C
In this example, the UPDATE command refers to the DEFAULT_
ATTACHMENT keyword (LATEST_CHECKIN) for the version to attach.
UPDATE then detaches the currently attached version of the
COMPILER_C collection and attaches the version most recently
replaced.
2.CDO> DEFINE CONTEXT WRITE_CONTEXT
cont> BASE_PARTITION IS FIRST_DRAFT TOP IS REFERENCE_MANUAL
cont> DEFAULT_ATTACHMENT IS SPECIFIC_VERSION.
.
.
.
CDO> CHANGE CONTEXT WRITER_CONTEXT
cont> DESCRIPTION IS "CHANGING DEFAULT_ATTACHMENT"
cont> "TO PICK UP AL'S CHAPTERS"
cont> DEFAULT_ATTACHMENT IS LATEST.
CDO> UPDATE COLLECTION REFERENCE_MANUAL
In this example, the UPDATE command refers to the DEFAULT_
ATTACHMENT keyword (LATEST) for the version to attach. UPDATE
then detaches the currently attached version of the REFERENCE_
MANUAL collection and attaches the latest version, whether
checked in or ghost.