VMS Help  —  RMU72  rrd_file_syntax, 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)0define-record =                                                          
                                                                             
  DEFINE RECORD <name> qwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwq> . qk 
                        mq> DESCRIPTION IS qqqqq> /* comment */ qqqqj      x 
    lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq  <qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
    mwq> <fieldname> qq> alignment-clause qqq> . qwqk                        
     mqqqqqqqqqqqqqqqqqqqq <qqqqqqqqqqqqqqqqqqqqqj x                         
    lqqqqqqqqqqqqqqqqqqqqqqqqqq <qqqqqqqqqqqqqqqqqqj                         
    mqq> END qwqqqqqqqqqqqwqwqqqqqqqqqqqqwqq> . qqqqqqqq>                    
              mq> <name> qj mq> RECORD qqj                                   
                                                                            

  (B)0alignment-clause =                                    
                                                          
  qwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwqq> 
   mq> ALIGNED ON qqwq> BYTE qqqqqqwqwqqqqqqqqqqqqqwqj    
                    tq> WORD qqqqqqu mq> BOUNDARY qj      
                    tq> LONGWORD qqu                      
                    tq> QUADWORD qqu                      
                    mq> OCTAWORD qqj                      
                                                          

    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
Close Help