Record_Definition=(File=name[,options])
Record_Definition=(Path=name[,options])
Specifies the RMS record definition or the data dictionary record
definition to be used when data is loaded into the database. Use
the File=name parameter to specify an RMS record definition file;
use the Path=name parameter to specify that the record definition
be extracted from the data dictionary. (If the record definition
in the data dictionary contains variants, Oracle RMU will not be
able to extract it.)
The default file extension for the File=name parameter is
.rrd. The syntax for the .rrd file is similar to that used by
the Common Dictionary Operator (CDO) interface for the data
dictionary. You must define columns before you can define rows.
You can place only one column on a line. You can create a sample
.rrd file by using the RMU Unload command with the Record_
Definition qualifier. You must ensure that the record definition
in the .rrd file and the actual data are consistent with each
other. Oracle Rdb does not check to see that data types in the
record definition and the data match. See the help entry for
RRD_File_Syntax and the Oracle Rdb Guide to Database Design and
Definition for more information about the format of the .rrd
file.
You must specify either the File=name or Path=name parameter.
The options available are:
o Exception_File=exception-file
Allows you to write unloadable records to a single exception
file for a single-process load operation and into multiple
exception files for a parallel load operation. If you generate
a load plan for a parallel load operation, each executor is
assigned its own exception file. In this case, the exception-
file name you specify is given a different file extension for
each executor.
While Oracle RMU is loading data from an RMS file, if an
exception file is specified, then under certain circumstances
an invalid record in the input file does not cause the
RMU Load command to abort. Instead, Oracle RMU creates the
exception file (or files), writes the unloadable record into
this exception file (or files), and continues loading the
remaining records. This process occurs only if the data is
invalid on the actual insert, due to index, constraint, or
trigger errors. If the record has an invalid format in the RMS
file (for example, a missing delimiter), the exception file is
not used, and the load process aborts.
At the end of the load operation, you can process the
exception file (or files) to correct any problems, and then
reload directly from the exception file or files. The load
operation gives an informational message for each of the
unloadable records and also gives a summary of the number
of records stored and the number of records rejected.
All records that could not be loaded will be written into the
file or files as specified with the argument to the Exception_
File option. The default file extension for the exception
file is .unl for single-process loads; for parallel loads
the default extension is EXC_n, where n corresponds to the
executor number assigned by Oracle RMU. The exception file or
files are created only if there are unloadable records. If the
Exception_File option is not specified, no exception files are
created, and the load operation aborts at the first occurrence
of an exception.
However, note that if the Defer_Index_Updates qualifier is
specified, and a constraint violation or lock conflict occurs,
the load operation aborts when it attempts to commit the
transaction.
If the Defer_Index_Updates qualifier is not specified, records
that cause a constraint violation are written to the exception
file or files and the load operation continues loading the
remaining records.
o Format=Text
If you specify the Format=Text option, Oracle RMU converts all
data to printable text before loading it.
o If you do not specify the Format option, then Oracle RMU
expects to load a fixed-length binary flat file. The data
type of the fields must be specified in the .rrd file.
o Format=(Delimited_Text [,delimiter-options])
If you specify the Format=Delimited_Text option, the .rrd file
contains only text fields and specifies the maximum length of
the columns in the file containing delimited ASCII text. The
column values that are longer than those specified in the .rrd
file are truncated.
Note that DATE VMS types must be specified in the collatable
time format, which is yyyymmddhhmmsscc. For example, March 20,
1993 must be specified as: 1993032000000000.
Unless you specify the Format=Delimited_Text option,
delimiters are regarded as part of the data by Oracle RMU.
Example 13 in the Examples help entry under this command
demonstrates the Format=Delimited_Text option. Delimiter
options (and their default values if you do not specify
delimiter options) are as follows. Note that with the
exception of the Prefix and Suffix delimiter options, the
values specified must be unique. The Prefix and Suffix values
can be the same value as each other, but not the same as other
delimiter options. The Null string must also be unique.
- Prefix=string
Specifies a prefix string that begins any column value in
the ASCII input file. If you omit this option, the column
prefix is assumed to consist of a quotation mark (").
- Separator=string
Specifies a string that separates column values of a row.
If you omit this option, the column separator is assumed to
consist of a single comma (,).
- Suffix=string
Specifies a suffix string that ends any column value in
the ASCII input file. If you omit this option, the column
suffix is assumed to consist of a quotation mark (").
- Terminator=string
Specifies the row terminator that completes all the column
values corresponding to a row. If you omit this option, the
row terminator is assumed to be the end of the line.
- Null=string
Specifies a string, which when found in the input record,
is stored as NULL in the database column. This option is
only valid when the Delimited_Text option is specified
also.
The Null option can be specified on the command line as any
one of the following:
* A quoted string
* An empty set of double quotes ("")
* No string
If provided, the string that represents the null character
must be quoted on the Oracle RMU command line, however, it
must not be quoted in the input file. You cannot specify a
blank space or spaces as the null character.
If the final column or columns of a record are to be set
to NULL, you only have to specify data for the column up to
the last non-null column.
See the Examples section for an example of each of these
methods of storing the NULL value.
NOTE
The values of each of the strings specified in the
delimiter options must be enclosed by quotation
marks. Oracle RMU strips these quotation marks while
interpreting the values. If you want to specify a
quotation mark (") as a delimiter, specify a string
of four quotation marks. Oracle RMU interprets four
quotation marks as your request to use one quotation
mark as a delimiter. For example, Suffix = """".
Oracle RMU reads the quotation marks as follows:
o The first quotation mark is stripped from the
string.
o The second and third quotation marks are
interpreted as your request for one quotation mark
(") as a delimiter.
o The fourth quotation mark is stripped. This
results in one quotation mark being used as a
delimiter.
Furthermore, if you want to specify a quotation mark
as part of the delimiter string, you must use two
quotation marks for each quotation mark that you
want to appear in the string. For example, Suffix
**"**.
A delimiter of blank spaces enclosed in quotes is not
valid.
o Place_Only=sorted-placement-file
Allows you to sort the input file and create an output file
sorted in Placement order.
The input file can first be sorted into Placement order by
using the Place_Only option. The resultant file can then be
loaded with the Commit_Every qualifier to gain the required
efficiency. Do not use this option with a parallel load
operation; parallel load operations perform best when the
input file is not sorted.
The Place_Only option cannot be used with either the Commit_
Every qualifier or the Exception_File option (data is not
being stored in the database). However, the Place_Only option
requires the Place qualifier be specified (to sort the data).
The placement-sorted output file has the default file
extension of .unl.
Unless you specify the Null option (with the Format=Delimited_
Text parameter of the Record_Definition qualifier), any null
values stored in the rows of the tables being loaded are not
preserved. Therefore, use the Null option if you want to preserve
null values stored in tables and you are moving data within the
database or between databases.
See the examples in the Examples help entry under the RMU Unload
command for more information.