The record definition files (.rrd) used by the RMU Load, RMU
Unload, and RMU Analyze commands are used to describe the field
data types and field ordering for binary and delimited text data
files. The .rrd files contain a simple language similar to that
accepted by the CDO interface of the Oracle CDD Repository. The
RMU Unload command automatically generates a record definition
file from the table definition in the database.
This appendix describes the .rrd language which is accepted
by the RMU Load command. It describes a useful subset of the
language supported by RMU. Clauses from CDO which RMU accepts but
ignores are not described.
1 – DEFINE FIELD statement
Each record definition file must include at least one DEFINE
FIELD statement to describe the data type of a field in the
unloaded record. This statement has two formats:
o a format that defines a new name
define field name_string datatype is text size is 20 characters.
o a format that references another, previously defined, field
define field first_name based on name_string.
RMU Unload generates the DEFINE FIELD statement with just
the DATATYPE clause. The full syntax is shown in DEFINE FIELD
Statement.
Figure 2 DEFINE FIELD Statement
(B)0[m[1mdefine-field = [m [1m [m
[1m [m [1m [m [1m [m
[1;4mDEFINE[m[1m [1;4mFIELD[m[1m <name> qwqqqqqqqqqqqqq> [1;4mBASED[m[1m [1;4mON[m[1m <name> qqqqqqqqqqqqqqqqwq> . q>[m
[1m [m [1m mqwqwq>[m [1;4mDATATYPE[m[1m IS[m [1mqqqqqqq> datatypes qqqqqqwqwqj [m
[1m [m [1m [m [1mx[m [1mtq> [1;4mDESCRIPTION[m[1m IS qqqq> /* comment */ qqu x [m
[1m [m [1m [m [1mx[m [1mmq> [1;4mFILLER[m[1m qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x [m
[1m [m [1m [m [1mmqqqqqqqqqqqqqqqqqqqqq <qqqqqqqqqqqqqqqqqqqqqj [m
[1m [m [1m [m [1m [m
[1m [m
The following example of the DEFINE FIELD statement is more
complete, showing the use of annotations (DESCRIPTION clause)
and based-on fields.
define field name_string
description is
/* This a generic string type to be used for based on */
datatype is text size is 20 characters.
define field first_name
based on name_string.
define field last_name
based on name_string.
define record PERSON
description is
/* Record which describes the PERSON.DAT RMS file */.
first_name.
last_name.
end.
2 – DEFINE RECORD statement
The DEFINE RECORD statement defines the ordering of the fields
within the file. A field may only be used once. The name of
the field is not used for column name matching unless the
Corresponding qualifier is used with the RMU Load command.
Figure 3 DEFINE RECORD Statement
(B)0[m[1mdefine-record = [m
[1m [m
[1;4mDEFINE[m[1m [1;4mRECORD[m[1m <name> qwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwq> . qk [m
[1m mq> [1;4mDESCRIPTION[m[1m IS qqqqq> /* comment */ qqqqj x [m
[1m lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq [m [1m<qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj[m
[1m mwq> <fieldname> qq> alignment-clause qqq> . qwqk [m
[1m mqqqqqqqqqqqqqqqqqqqq <qqqqqqqqqqqqqqqqqqqqqj x [m
[1m lqqqqqqqqqqqqqqqqqqqqqqqqqq <qqqqqqqqqqqqqqqqqqj [m
[1m mqq> [1;4mEND[m[1m qwqqqqqqqqqqqwqwqqqqqqqqqqqqwqq> . qqqqqqqq> [m
[1m mq> <name> qj mq> [1;4mRECORD[m[1m qqj [m
[1m [m
(B)0[m[1malignment-clause = [m
[1m [m
[1mqwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwqq> [m
[1m mq> [1;4mALIGNED[m[1m [1;4mON[m[1m qqwq> [1;4mBYTE[m[1m qqqqqqwqwqqqqqqqqqqqqqwqj [m
[1m tq> [1;4mWORD[m[1m qqqqqqu mq> [1;4mBOUNDARY[m[1m qj [m
[1m tq> [1;4mLONGWORD[m[1m qqu [m
[1m tq> [1;4mQUADWORD[m[1m qqu [m
[1m mq> [1;4mOCTAWORD[m[1m qqj [m
[1m [m
The ALIGNED ON clause can be used to adjust for alignment added
explicitly or implicitly by host language applications. For
instance, on OpenVMS Alpha many 3GL language compilers naturally
align fields to take advantage of the Alpha processor hardware
which executes more efficiently when data is well aligned. The
default is BYTE alignment.
In the following example, field C is expected to start on a
quadword boundary, so A is assigned the first longword, the
second longword is ignored, and finally the C is assigned the
last longword value.
define field A datatype is signed longword.
define field C datatype is signed longword.
define record RMUTEST.
A .
C aligned on quadword boundary.
end RMUTEST record.
2.1 – Usage notes
o When the DCL verify process is enabled using the DCL SET
VERIFY command or the DCL F$VERIFY lexical function, RMU Load
writes the .rrd file being processed to SYS$OUTPUT.
o There is no equivalent to the VARCHAR or VARYING STRING data
types in the record definition language because there is
no support for these types in the OpenVMS Record Management
Services (RMS) environment.
o The VARCHAR or VARYING STRING data type is a two-part type
with an UNSIGNED WORD (16 bit integer) length prefix with a
fixed TEXT portion. The length defines the actual data in the
string.
There is no equivalent to the VARCHAR or VARYING STRING data
types in the record definition language as this type is not
supported by the OpenVMS Record Management Services (RMS)
environment.
If you unload a VARCHAR column then it will be converted to
a fixed length (space padded) TEXT field. However, TEXT to
VARCHAR load and unload is handled appropriately when using
the delimited format. In this format RMU Unload only outputs
the text as specified by the length prefix of the VARCHAR
column. Likewise, RMU Load uses the length of the delimited
string to set the length in the database.
o If a field is not to be used during the load into the table,
it can be ignored during the load using the FILLER attribute.
This allows RMU Load to use a data file which has more fields
than there are columns in the database table.
o The <name> referenced in the END RECORD clause must be the
same as the name defined by the DEFINE RECORD statement.
o The record definition files are not used when the Record_
definition qualifier is omitted. In this case RMU Unload
generates a structured internal file format which contains
both the record definition and the data. This format allows
the unloading of LIST OF BYTE VARYING columns and NULL values.
This format is the same as that generated by SQL EXPORT for
its interchange (.rbr) file. Use the RMU Dump Export command
to format the contents of this file for display.
$ rmu/unload mf_personnel employees employees.unl
$ rmu/dump/export/nodata employees.unl
3 – Additional Data Types
The data types that are supported by Oracle Rdb are described in
Oracle Rdb SQL Reference Manual.
Figure 4 Data Types
(B)0[m[1mdatatypes = [m
[1m [m
[1mqqwq> date-time-types qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwq>[m
[1m tq> [1;4mTEXT[m[1m qq> character-size-clause qq> character-set-clause qqqqqqqqqu [m
[1m tq> [1;4mF_FLOATING[m[1m qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu [m
[1m tq> [1;4mG_FLOATING[m[1m qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu [m
[1m tq> [1;4mLEFT[m[1m [1;4mSEPARATE[m[1m [1;4mNUMERIC[m[1m qwq> scale-clause qq> numeric-size-clause qu [m
[1m tq> [1;4mPACKED[m[1m [1;4mDECIMAL[m[1m qqqqqqqqu x [m
[1m tq> [1;4mUNSIGNED[m[1m [1;4mNUMERIC[m[1m qqqqqqj x [m
[1m mq> [1;4mSIGNED[m[1m qwq> [1;4mBYTE[m[1m qqqqqwqq> scale-clause qqqqqqqqqqqqqqqqqqqqqqqqqj [m
[1m tq> [1;4mWORD[m[1m qqqqqu [m
[1m tq> [1;4mLONGWORD[m[1m qu [m
[1m mq> [1;4mQUADWORD[m[1m qj [m
[1m [m
(B)0[m[1mnumeric-size-clause = [m
[1m [m
[1mqwqqqqqqqqqqqqqwqqq> <number> qqwqqqqqqqqqqqwqq> [m
[1m mq> [1;4mSIZE[m[1m IS qqj [m [1m mq> [1;4mDIGITS[m[1m qj [m
[1m [m
(B)0[m[1mcharacter-size-clause = [m
[1m [m
[1mqwqqqqqqqqqqqqqqqwq> <number> qqwqqqqqqqqqqqqqqqwqq> [m
[1m mqq> [1;4mSIZE[m[1m IS qqqj mq> [1;4mCHARACTERS[m[1m qj [m
[1m [m
(B)0[m[1mscale-clause = [m
[1m [m
[1mqqwqqqqqqqqqqqqqqqqqwqq> <number> qqq> [m
[1m mqq> [1;4mSCALE[m[1m IS qqqqj [m
[1m [m
(B)0[m[1mcharacter-set-clause = [m
[1m [m
[1mqwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwqq> [m
[1m mq> [1;4mCHARACTER[m[1m [1;4mSET[m[1m IS qqqqqqq> <cset-name> qqj [m
[1m [m
The cset-name is any character set supported by Oracle Rdb. These
character sets are expanded from release to release. Please refer
to the Oracle Rdb SQL Reference Manual for new character sets and
more information on the character sets listed below.
When several character sets are available for the same language
(such as Kanji and Hanyu), each is based on a different local or
international standard that differs from the others in format and
structure. For instance, SHIFT_JIS is widely used with Microsoft
Windows systems in Japan, but differs in format from the DEC_
KANJI character set supported by Hewlett Packard Company's
DECWindows product.
Table 22 Character sets supported by Oracle RMU Load
Character
Set Description
ARABIC Arabic characters as defined by the ASMO 449 and
ISO9036 standards
BIG5 A set of characters used by the Taiwan information
industry
DEC_HANYU Traditional Chinese characters (Hanyu) as used
in Taiwan and defined by standard CNS11643:1986,
supplemental characters as defined by DTSCC and
ASCII
DEC_HANZI Chinese (Bopomofo) characters as defined by
standard GB2312:1980 and ASCII characters
DEC_KANJI Japanese characters as defined by the JIS
X0208:1990 standard, Hankaku Katakana characters
as defined by JIS X0201:1976 prefixed by SS2
(8E hex), user-defined characters, and ASCII
characters
DEC_KOREAN Korean characters as defined by standard KS
C5601:1987 and ASCII characters
DEC_MCS A set of international alphanumeric characters,
including characters with diacritical marks
DEC_SICGCC Traditional Chinese characters (Hanyu) as used in
Taiwan and defined by standard CNS11643:1986 and
ASCII
DEVANAGARI Devanagari characters as defined by the ISCII:1988
standard
DOS_LATIN1 DOS Latin 1 code
DOS_LATINUS DOS Latin US code
HANYU Traditional Chinese characters (Hanyu) as used in
Taiwan and defined by the standard CNS11643:1986
HANZI Chinese (Bopomofo) characters as defined by
standard GB2312:1980
HEX Translation of text data to and from hexadecimal
data
ISOLATINARABIC Arabic characters as defined by the ISO/IEC 8859-
6:1987 standard
ISOLATINCYRILLICyrillic characters as defined by the ISO/IEC
8859-5:1987 standard
ISOLATINGREEK Greek characters as defined by the ISO/IEC 8859-
7:1987 standard
ISOLATINHEBREW Hebrew characters as defined by the ISO/IEC 8859-
8:1987 standard
KANJI Japanese characters as defined by the JIS
X0208:1990 standard and user-defined characters
KATAKANA Japanese phonetic alphabet (Hankaku Katakana), as
defined by standard JIS X0201:1976
KOREAN Korean characters as defined by standard KS
C5601:1987
SHIFT_JIS Japanese characters as defined by the JIS
X0208:1990 standard using Shift_JIS specific
encoding scheme, Hankaku Katakana characters as
defined by JIS X0201:1976, and ASCII characters
TACTIS Thai characters based on TACTIS (Thai API
Consortium/Thai Industrial Standard) which is
a combination of ISO 646-1983 and TIS 620-2533
standards
UNICODE Unicode characters as described by Unicode
Standard and ISO/IEC 10646 transformation format
UTF-16
UTF8 Unicode characters as described by Unicode
Standard and ISO/IEC 10646 UTF-encoding form
WIN_ARABIC MS Windows Code Page 1256
8-Bit Latin/Arabic
WIN_CYRILLIC MS Windows Code Page 1251
8-Bit Latin/Cyrillic
WIN_GREEK MS Windows Code Page 1253
8-Bit Latin/Greek
WIN_HEBREW MS Windows Code Page 1255
8-Bit Latin/Hebrew
WIN_LATIN1 MS Windows Code Page 1252
8-Bit West European
4 – Date-Time Syntax
The date-time syntax in .rrd files generated by the RMU
Unload command with the Record_Definition=(File=file) command
is compatible with the date-time syntax support of Oracle
CDD/Repository V6.1 and later versions.
The date-time data type has the following syntax in the .rrd
file.
(B)0[m[1mdate-time-types = [m
[1m [m
[1mqqwq> [1;4mDATE[m[1m qwqqqqqqqqqqwqqqqqqqqqqqqqqqqqwqq> [m
[1m x tq> [1;4mANSI[m[1m qu x [m
[1m x mq> [1;4mVMS[m[1m qqqj x [m
[1m tq> [1;4mTIME[m[1m qqq> scale-clause qqqqqqqqqqqqu[m
[1m tq> [1;4mTIMESTAMP[m[1m qq> scale-clause qqqqqqqqu[m
[1m mq> [1;4mINTERVAL[m[1m qqq> interval-qualifier qqj [m
[1m [m
(B)0[m[1minterval-qualifier = [m [1m [m
[1m [m [1m [m
[1mqqwq> [1;4mYEAR[m[1m qqq> numeric-size-clause qwqqqqqqqqqqqqqwqqqqqqqqqqqqqqqqqqqqqqqqqwq>[m
[1m x [m [1mmq> [1;4mTO[m[1m [1;4mMONTH[m[1m qj [m [1mx[m
[1m tq> [1;4mMONTH[m[1m qq> numeric-size-clause qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu[m
[1m tq> [1;4mDAY[m[1m qqqq> numeric-size-clause qwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwu[m
[1m x mq> [1;4mTO[m[1m qwq> [1;4mHOUR[m [1mqqqqqqqqqqqqqqqqqqqqqqux[m
[1m x [m [1m tq> [1;4mMINUTE[m[1m qqqqqqqqqqqqqqqqqqqqux[m
[1m x [m [1m mq> [1;4mSECOND[m [1mq> scale-clause qqqqjx[m
[1m tq> [1;4mHOUR[m[1m qqq> numeric-size-clause qwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwqu[m
[1m x mq> [1;4mTO[m[1m qwq> [1;4mMINUTE[m[1m qqqqqqqqqqqqqqqqqqqu x[m [1m [m
[1m x mq> [1;4mSECOND[m[1m q> scale-clause qqqj x[m
[1m tq> [1;4mMINUTE[m[1m q> numeric-size-clause qwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwqqu [m
[1m x mq> [1;4mTO[m[1m [1;4mSECOND[m [1mqqq> scale-clause qqqqj[m [1m x [m
[1m mq> [1;4mSECOND[m[1m q> seconds-clause qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj [m
(B)0[m[1mscale-clause = [m
[1m [m
[1mqqwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwqqqqqqqq[m
[1m mq> [1;4mSCALE[m[1m <numeric-literal> qqj [m
[1m [m
(B)0[m[1mnumeric-size-clause = [m
[1m [m
[1mqqwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwqqqq> [m
[1m mqwqqqqqqqqqqqqqwqqqqqqq> <numeric-literal>[m [1mqqk x [m
[1m mq> [1;4mSIZE[m[1m IS qqj[m [1m [m [1m x[m [1mx[m
[1mlqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj[m [1mx[m
[1mmqwqqqqqqqqqqqqwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj[m
[1mmq>[m [1;4mDIGITS[m[1m qqj[m
(B)0[m[1mseconds-clause = [m
[1m [m
[1mqqwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwqqqqq> [m
[1m mqwqqqqqqqqqqqqqwqqqqqqqqqqqq> <numeric-literal-1> qqqqqqqk x [m
[1mmqq>[m [1;4mSIZE[m[1m IS qj[m [1m [m [1m [m [1m x[m [1mx[m
[1m lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj[m [1mx[m
[1m mqwqqqqqqqqqqqqqwqqwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwqqqqj[m
[1m [m [1mmq> [1;4mDIGITS[m[1m qqj mq> [1;4mSCALE[m[1m <numeric-literal-2> qqqqj[m
[1m [m
Note that SCALE values must be between 0 and -2 and that SIZE IS
values must be between 2 and 9.
The following are examples of typical field definitions for date-
time data types in .rrd files:
DEFINE FIELD A DATATYPE IS DATE.
DEFINE FIELD B DATATYPE IS DATE ANSI.
DEFINE FIELD C DATATYPE IS INTERVAL DAY SIZE IS 2 DIGITS.
DEFINE FIELD D DATATYPE IS INTERVAL DAY SIZE IS 2 DIGITS TO HOUR.
DEFINE FIELD E DATATYPE IS INTERVAL DAY SIZE IS 2 DIGITS TO
SECOND SCALE -2.
DEFINE FIELD F DATATYPE IS INTERVAL HOUR SIZE IS 4 DIGITS.
DEFINE FIELD G DATATYPE IS INTERVAL HOUR SIZE IS 2 DIGITS TO MINUTE.
DEFINE FIELD H DATATYPE IS INTERVAL MINUTE SIZE IS 2 DIGITS TO
SECOND SCALE -2.
DEFINE FIELD I DATATYPE IS INTERVAL SECOND SIZE IS 2 DIGITS SCALE -2.
DEFINE FIELD J DATATYPE IS TIME.
DEFINE FIELD K DATATYPE IS TIME SCALE -1.
DEFINE FIELD L DATATYPE IS TIMESTAMP SCALE -2.
DEFINE FIELD M DATATYPE IS INTERVAL YEAR SIZE IS 3 DIGITS TO MONTH.