Here is the PD sort card in JCL. If needed, you can elaborate on it. We need data in Zoned decimal. When the data is in the ZD, we can view it.
How to convert ‘PD’ to ‘ZD’
Here is a sort card to convert packed decimals to zoned decimals.
Since packed decimal data you can’t read in the EDIT field, you can specify a format you want for display.
//sysin DD * SORT FIELDS=COPY INCLUDE COND=(1,5,PD,EDIT(TTTTTTT.TT)) /*
//sysin DD * SORT FIELDS=COPY INCLUDE COND=(1,5,PD,TO=ZD,LENGTH=9) /*
Here I used SORT FIELDS=COPY is equal to OPTION COPY. Calculation for length: PD= 5 bytes Length=((2 x PD) -1) = (2x 5) -1 = 9 bytes.
Comments are closed.