Model Templates : Properties : Properties Segment Section

Properties Segment Section

The long segment of the template begins with its mandatory identifier line, SEGMENT report;. This name is used to attach a name to the segment that follows. In templates possessing more than one segment, you can use this name to identify the specific segment. See Using Documentor.

The declaration part follows. First, it declares the variable di to represent a data-item. This variable will be used to iterate on the list of data-items.

Next, the template declares variables used in database functions to extract information about each data-item in the properties. The variables—di_name, di_synonym, and di_desc—correspond to the information contained in the name, synonym, and description fields of the data-item form shown previously. All three of these variables are declared to be of type STRING.

The next variable, di_type, represents the information entered in the type field of the data-item form. Because each of the options in this field corresponds to an integer value, this variable is declared to be of type INTEGER. Each integer value corresponds to a predefined constant; these constants, instead of the integer values, are used later in the template.

The string variable di_desc_file represents the name of a file. This variable will be used for the names of the files that include portions of the data-item’s long description.

Next, the template includes variables having to do with information pertaining to the attribute fields. The variable attr_list represents the list of attribute names entered in the attribute name field of the data-item form. You will build this list later in the template through the use of a Statemate database extraction function. Similarly, the variable attr_val_list represents the list of attribute values. Lastly, the variables attr and attr_val are used to represent individual attribute names and values, respectively; these variables are used later to iterate on the list of attribute names and values.