prabs2006
Here is an example for a card explaining convertion from one numeric type to another.
This is the snapshot from the manual.
Quote:
INREC, OUTREC and OUTFIL can convert a field in one numeric format to another numeric format. You can
convert BI, FI, PD, PD0, ZD, CSF/FS, UFF, SFF, FL or Y2x input fields to BI, FI, PD, PDF, PDC, ZD, ZDF,
ZDC or CSF/FS output fields. The length of the output field can be defaulted or specified. As a simple
example, if you specify:
OUTREC BUILD=(21,5,ZD,TO=PD,8,4,ZD,TO=FI,LENGTH=2)
the zoned decimal values in positions 21-25 and 8-11 of the input records will be converted, respectively, to a
packed decimal value in positions 1-3 and a fixed-point value in positions 4-5 of the output records.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
How can we change from Packed decial field to Zoned decimal in a file thru sort ? (sign fields included)
You would use p,m,PD,TO=ZD,LENGTH=n where p is the starting position of the PD input field, m is its length, and n is the length of the ZD output field.
Note that EDIT=(STTTTT.TT) would NOT create a ZD field. A ZD field does NOT have a leading sign or a decimal point.
For more information on numeric conversions with DFSORT, see:
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from: