Building on the last example, assume you want to reformat the records to include a new 4-byte binary field after the number in stock (beginning at byte 13). In this case, you can insert binary zeros as place holders for the new field (to be filled in with data at a later date). You can use Z or 1Z to specify a single binary zero. You can use nZ to specify n binary zeros.
To insert four binary zeros, write 4Z after the last field:
SORT FIELDS=(106,4,CH,A)
SUM FIELDS=(162,4,BI,166,4,BI)
OUTREC FIELDS=(106,4,166,4,162,4,4Z)
Table 1 shows the result.
| Publisher | Number Sold | Number In Stock | X'0...0' |
|---|---|---|---|
1 4 |
5 8 |
9 12 |
13 16 |
COR |
161 |
103 |
0...0 |