Format DEFINE FILE_ELEMENT type-name element-name [ DESCRIPTION IS /*text*/ ] [ AUDIT IS /*text*/ ] [ STORETYPE INTERNAL ] [ STORETYPE EXTERNAL MCS_STOREDIN IS quoted-string ] [ ] [ MCS_IMPORTED FROM quoted-string ] [ {n } ] [ property-name IS {quoted-string } ] ... . [ { } ] END [ FILE_ELEMENT ] type-name [ element-name ] .
1 – Parameters
1.1 – type-name
Specifies the type (MCS_BINARY or an MCS_BINARY subtype) of the file element you are creating. See the Oracle CDD/Repository Information Model Volume I for more information on these types.
1.2 – element-name
Specifies the file element you are creating.
1.3 – text
Adds information. Within the DESCRIPTION clause, this is information documenting the file element; 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.4 – quoted-string
Sets the value (a string enclosed in quotation marks) for the property you are specifying.
1.5 – property-name
Specifies the property whose value you are setting.
1.6 – n
Sets the numeric value for a property.
2 – Description
The DEFINE FILE_ELEMENT command creates a file element. Before you issue the DEFINE FILE_ELEMENT command, you must define and set a context. The SHOW CONTEXT command indicates whether you have completed these steps. You control file element definitions as soon as you define them. To do this, issue the following commands before you define a file element: 1. DEFINE PARTITION, which creates a partition 2. DEFINE CONTEXT, which associates this partition with a specific context 3. SET CONTEXT, which identifies this context as the current context and implicitly controls all subsequent definitions Since a file element is a controlled element, the DEFINE FILE_ ELEMENT command creates the initial version of the file element. The RESERVE and REPLACE commands create new versions. The STORETYPE clause indicates whether or not the file is stored internally (in Oracle CDD/Repository) or externally. If you do not specify STORETYPE, the default is external. If you add, change, or delete a property from the file element, the property you specify must be a defined or inherited property for the file element's type. See the Oracle CDD/Repository Information Model, Volume I for a list of these properties. Errors occur if you do not specify the MCS_STOREDIN property for a file element whose STORETYPE is EXTERNAL. CDO requires this property for external files.
3 – Examples
CDO> DEFINE FILE_ELEMENT MCS_BINARY PARSER_TABLES cont> STORETYPE EXTERNAL cont> MCS_STOREDIN IS "CDD$DISK:[SMITH]PARSER_TABLES.DAT". cont> END FILE_ELEMENT MCS_BINARY PARSER_TABLES. In this example, the DEFINE FILE_ELEMENT command includes a STORETYPE EXTERNAL clause. CDO creates an external file element PARSER_TABLES stored in CDD$DISK:[SMITH]PARSER_TABLES.DAT.