z/OS DFSORT: Getting Started
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Inserting binary zeros

z/OS DFSORT: Getting Started
SC23-6880-00

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.

Table 1. Inserting Binary Zeros
Publisher Number Sold Number In Stock X'0...0'

1  4

5  8

9  12

13  16

COR
FERN
VALD
WETH

 161
  87
  97
  79

  103
   19
   42
   62

  0...0
  0...0
  0...0
  0...0

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014