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.
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