1 /* ********** BEGIN INCLUDE FILE dm_field_table.incl.pl1 ********** */ 2 3 /* DESCRIPTION: 4 5 The field_table describes the layout of a set of fields in a 6 formatted data string. Such a string is the stored representation of a 7 record or a key. Fields are placed side-by-side in the string in the 8 order they appear in the field_table.field array. The string is divided 9 into the fixed portion and the varying portion. In the fixed portion 10 appear fixed-length fields and fixed-size length-fields for 11 varying-length fields. In the varying portion appear varying length 12 fields. The length-field for a varying-length field contains the length 13 of the field values either in bits or in characters, depending on the 14 data type of the field. 15 */ 16 17 /* HISTORY: 18 Written by Matthew Pierret, 04/01/82. 19 Modified: 20 04/20/82 by Matthew Pierret: Added length_is_in_characters, meaning, if on, 21 that if the field is varying, its length is expressed in 22 bytes/characters. 23 03/22/83 by Lindsey Spratt: Changed lofvf to have a precision of 35 instead 24 of 17, changed version to 2, changed version field to char(8) from 25 fixed bin (17). 26 05/01/84 by Matthew Pierret: Changed version to 3. Removed field.name and 27 put field names in one string (field_names) at the end of the 28 structure. Added field.location_of_name and field.length_of_name 29 for locating the field name in field_names. Aligned all "fixed bin" 30 structure elements. Changed maximum_field_name_length to 31 length_of_field_names. 32 */ 33 34 /* format: style2 */ 35 36 dcl 1 field_table aligned based (field_table_ptr), 37 2 version char (8) aligned init (FIELD_TABLE_VERSION_3), 38 2 number_of_fields fixed bin (17), 39 2 length_of_field_names 40 fixed bin (17), /* length of field_names in characters */ 41 2 location_of_first_varying_field 42 fixed bin (35), /* location of first bit in the varying portion of the formatted string */ 43 2 field (ft_number_of_fields refer (field_table.number_of_fields)), 44 3 flags aligned, 45 4 descriptor_is_varying 46 bit (1) unal, /* if on, the descriptor is not limited to the standard 36 bits */ 47 /* and is stored in a stand-alone fashion, with field.descriptor */ 48 /* containing the id of the element in which the descriptor is stored. */ 49 4 length_is_in_characters 50 bit (1) unal, /* if field is varying, the length field describes its length */ 51 /* in characters instead of in bits */ 52 4 must_be_zero bit (34) unal, 53 3 descriptor bit (36) aligned, 54 3 location fixed bin (35), /* location of first bit of field in formatted string */ 55 3 length_in_bits fixed bin (35), /* length of field in bits */ 56 3 location_of_name fixed bin (17), /* location of first character of field name in field_names */ 57 3 length_of_name fixed bin (17), /* length of name in characters */ 58 2 varying_field_map (ft_number_of_fields refer (field_table.number_of_fields)), 59 3 field_id fixed bin (17), /* field_id of Nth varying field */ 60 3 varying_field_index 61 fixed bin (17), /* ordinality among varying fields of field N */ 62 2 field_names char (ft_length_of_field_names refer (field_table.length_of_field_names)); 63 64 65 dcl field_table_ptr ptr; 66 dcl ft_length_of_field_names 67 fixed bin; 68 dcl ft_number_of_fields fixed bin; 69 dcl FIELD_TABLE_VERSION_3 char (8) aligned init ("FldTbl 3") internal static options (constant); 70 71 dcl field_name char (field_name_length) based (field_name_ptr); 72 73 dcl field_name_length fixed bin; 74 dcl field_name_ptr ptr; 75 76 /* END INCLUDE FILE dm_field_table.incl.pl1 */