In this article
The Spread format will generate a Triple-S XML template in which data is recorded as a series of sub-fields each containing one category value of the variable. The category value is recorded as an integer number as described in the <values> element. The number 0 should be used to represent sub-fields that are not needed.
The data sub-field length is the minimum number of characters required to represent the largest value in the values block. Thus variables with values up to 9 have a data sub-field one character long, variables with values up to 99 have a data sub-field length of 2, and so on. If any particular data value requires less than the maximum for the sub-field, it should be right justified using leading space or zero characters as padding. Data values may be stored in any or all sub-fields.
If the data sub-field length is less than the sub-field defined in the <spread> element then it is assumed to be right justified within the width defined in the spread. Export programs must ensure that extra columns contain blanks or zeros within the sub-fields.
If the total width of the sub-fields is less than that defined in the <position> element, then the sub-fields are stored consecutively, left-justified within the locations defined by the position. Export programs must ensure that any extra columns contain blanks or zeros. For example, for Triple-S XML version 2.0:
| Data value | Maximum in <values> element | <spread> element | <position> element | Data record b=space |
| 1 | 1 to 9 | subfields="2" width="1" | start="21" finish="22" | 10 or 01 |
| 1 | 1, 2, 3 and 9 | subfields="2" width="1" | start="21" finish="22" | 10 or 01 |
| 1,3 | 1 to 9 | subfields="2" width="1" | start="21" finish="22" | 13 |
| 1 | 1 to 9 | subfields="2" width="2" | start="21" finish="24" | b1b0 or b0b1 or 0100 etc |
| none | 1 to 9 | subfields="2" width="1" | start="21" finish="22" | 00 |
| 2 | 1, 2, 3 and 9 | subfields="2" width="1" | start="21" finish="24" | 20bb or 02bb or 2000 etc |
| 1,42 | 1 to 999 | subfields="2" width="3" | start="21" finish="26" | 001042 |
| missing | 1 to 999 | subfields="2" width="3" | start="21" finish="26" | bbbbbb |
| 1 | 1 to 9 | subfields="2" width="1" | start="4" (csv format) | 1 or 10 or "10" or "01" |
| 1 | 1 to 99 | subfields="2" width="2" | start="4" (csv format) | "0100" or "0001" |