Format DEFINE PARTITION partition-name [ DESCRIPTION IS /*text*/ ] [ AUDIT IS /*text*/ ] [ PARENT_PARTITION IS parent-partition-name ] [ LOOKASIDE_PARTITION IS look-partition-name ,... ]... [ ] [ AUTOPURGE ] [ NOAUTOPURGE ] . [ ]
1 – Parameters
1.1 – partition-name
Specifies the partition you are creating.
1.2 – text
Adds information. Within the DESCRIPTION clause, this is information documenting the partition; 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 – parent-partition-name
Specifies the parent partition, which must currently exist.
1.4 – look-partition-name
Specifies a related partition that is visible through this partition. The related partition must currently exist.
2 – Description
The DEFINE PARTITION command creates a partition. Partitions are the means by which you control elements. When you control an element, you identify the partition, which is called the base partition, in which a public, immutable copy of this element resides. CDO provides two ways to control elements, as follows: o On an element-by-element basis, with the CONSTRAIN command. CDO controls the element that appears within the command. o Through a context with the DEFINE CONTEXT and SET CONTEXT commands. Once you set the context, CDO controls all subsequent elements until the context is changed. Once an element has been controlled, you use the RESERVE and REPLACE commands to create subsequent versions. This reservation system prevents uncontrolled changes to elements. You can link partitions together to control change in various stages of a project. Each partition then represents a higher level of approval, or completion, in the overall partition hierarchy. The PROMOTE command moves elements higher within the hierarchy. The PARENT_PARTITION clause in the DEFINE PARTITION command creates a partition hierarchy by linking partitions in a parent- child relationship. The first, or root, partition does not have a parent partition. The second partition in the hierarchy has the first partition as its parent, and so on down the hierarchy. This clause can be specified only once during the lifetime of the partition, in either the DEFINE PARTITION or CHANGE PARTITION command. The LOOKASIDE_PARTITION clause makes the contents of another partition visible, provided that you have read privileges for the partition. You can read, but you cannot reserve, replace, or change the contents. The AUTOPURGE keyword ensures that CDO automatically purges intermediate versions of elements in the partition when you promote the latest version. The NOAUTOPURGE keyword prevents this automatic purging.
3 – Examples
CDO> DEFINE PARTITION FINAL_RELEASE AUTOPURGE. 1 CDO> DEFINE PARTITION FIELDTEST_RELEASE 2 cont> PARENT_PARTITION IS FINAL_RELEASE AUTOPURGE. CDO> DEFINE PARTITION SECOND_BASELEVEL cont> PARENT_PARTITION IS FIELDTEST_RELEASE AUTOPURGE. CDO> DEFINE PARTITION FIRST_BASELEVEL cont> PARENT_PARTITION IS SECOND_BASELEVEL AUTOPURGE. CDO> DEFINE PARTITION FRONT_END cont> PARENT_PARTITION IS FIRST_BASELEVEL AUTOPURGE. CDO> DEFINE PARTITION BACK_END 3 cont> PARENT_PARTITION IS FIRST_BASELEVEL cont> LOOKASIDE_PARTITION IS FRONT_END AUTOPURGE. CDO> CHANGE PARTITION FRONT_END 4 cont> LOOKASIDE_PARTITION IS BACK_END. . . . CDO> DEFINE CONTEXT BILL_CONTEXT 5 cont> BASE_PARTITION IS FRONT_END. CDO> DEFINE CONTEXT BETSY_CONTEXT cont> BASE_PARTITION IS BACK_END. CDO> DEFINE CONTEXT QA_CONTEXT cont> BASE_PARTITION IS FIELDTEST_RELEASE. In this example, successive DEFINE PARTITION commands create a partition hierarchy. 1 The root partition is FINAL_RELEASE. 2 Each successive partition in the hierarchy is the child of the previous partition. 3 A partition hierarchy can include multiple children of a previous partition; LOOKASIDE_PARTITION makes the contents of FRONT_END visible to BACK_END. 4 The CHANGE PARTITION command makes the contents of BACK_END visible to FRONT_END. 5 The base partition, or lowest visible partition, is set for three different contexts.