Format CHANGE CONTEXT context-name [ DESCRIPTION IS /*text*/ ] [ NODESCRIPTION ] [ AUDIT IS /*text*/ ] [ ] [ TOP IS collection-name ] [ NOTOP ] [ ] [ {SPECIFIC_VERSION } ] [ DEFAULT_ATTACHMENT IS {LATEST_CHECKIN } ] . [ {LATEST } ] [ { } ]
1 – Parameters
1.1 – context-name
Specifies the context you are modifying.
1.2 – text
Modifies information. Within the DESCRIPTION clause, this is information documenting the context; within the AUDIT clause, it is a history list entry. Valid delimiters are /* */ or double quotation marks (" "). You can use Japanese to document comments in the DESCRIPTION or 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.
1.3 – collection-name
Specifies a new collection as the top collection for the context.
2 – Description
The CHANGE CONTEXT command modifies a context by performing a change in place. CDO changes the values you specify, and other values remain the same. Because a context is a nonversioned element, CDO does not accept a branch designation or a version number in the context name. The TOP clause redefines the top collection property for the context. An error occurs if you attempt to redefine the top collection while you have any element reserved to your context. The SHOW CONTEXT or SHOW RESERVATIONS command indicates whether this condition exists. The NOTOP keyword sets the top collection property to a null value. The DEFAULT_ATTACHMENT clause redefines the default attachment property for the context. This property refers to the default behavior that occurs when you issue the UPDATE command. Choose one of the following keywords: DEFAULT_ ATTACHMENT Keyword Behavior SPECIFIC_ Does not detach the currently attached version. VERSION LATEST_CHECKIN Detaches the currently attached version and attaches the most recently checked in version. LATEST Detaches the currently attached version and attaches the lastest version, whether it is checked in or is a ghost. The LATEST keyword is the default.
3 – Examples
CDO> CHANGE CONTEXT DEVELOPMENT_CONTEXT cont> DESCRIPTION IS "ARCHIVING THIS CONTEXT" cont> "VERSION 5.0 DEVELOPMENT COMPLETED" cont> NOTOP cont> DEFAULT_ATTACHMENT IS SPECIFIC_VERSION. In this example, the CHANGE CONTEXT command modifies the DEFAULT_ATTACHMENT clause, the description text, and the TOP clause in the DEVELOPMENT_CONTEXT context.