HELPLIB.HLB  —  RMU72  rrd_file_syntax, 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)0define-field =                                                         
                                                                           
  DEFINE FIELD <name> qwqqqqqqqqqqqqq> BASED ON <name>  qqqqqqqqqqqqqqqqwq> . q>
                       mqwqwq> DATATYPE IS qqqqqqq> datatypes qqqqqqwqwqj 
                         x tq> DESCRIPTION IS qqqq> /* comment */ qqu x   
                         x mq> FILLER qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x   
                         mqqqqqqqqqqqqqqqqqqqqq <qqqqqqqqqqqqqqqqqqqqqj   
                                                                         
                                            

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