Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
Posted: Fri Jul 11, 2003 8:51 am Post subject:
Novice,
PIC S9(09) COMP is BINARY or FI(fixed point binary) field but not a packed decimal, so change your sort cards to the following and you will get the desired results.
Thanks Kolusu! It was a typo eror. My requirment was to change from Packed decimal to numeric. So what should be the control card?
Sorry for the incorrect data entered and also thanks for your time.
Kolusu,
My input record is like this:
2004-01-09-00:00:18 970011069 210000019 2003-12-03 269.
I wanto to convert 970011069 into Binary and 210000019 into packed decimal.
And full record should come in the input.i.e. other two date fields mentioned in the input record should be same at the output.
01,20 $ FIRST 20 BYTES AS IS
21,09,ZD,BI, $ CONV 9 BYTES ZD TO 4 BYTE BINARY
30,01, $ 30TH BYTE AS IS
31,9,ZD,PD,LENGTH=6, $ CONV 9 BYTES ZD TO 6 BYTE PACKED DECIMAL
40,16) $ REST OF THE FIELDS
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Wed Aug 18, 2004 12:26 pm Post subject:
For some more information on DFSORT's numeric conversion features, see "Reformatting Features" - "Reformatting: Numeric Conversion" in "Beyond Sorting" at:
Interesting !!!
Hi Ravi,
It seems if we mention more that 9 bytes (02,10,ZD,BI,) it won't work.
try the below control card.
SORT FIELDS=COPY
OUTREC FIELDS=(01,01,
02,5,ZD,BI,
07,5,ZD,BI,
12,03,
15,10,
25,10,
35,5,ZD,BI,
40,5,ZD,BI,
45,03,
48,5,ZD,BI,
53,5,ZD,BI,
58,5,ZD,BI,
63,5,ZD,BI,
68,4,ZD,BI)
The binary field occupies 4 bytes, I think if we mention 10 bytes the 'HIGH VALUES" will be moved to the output fields ..
Please correct me if I am wrong.
_________________ Regards
Hari
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Mon Dec 27, 2004 7:41 pm Post subject:
For those who use DFSORT:
Note that with z/OS DFSORT V1R5 PTF UQ95214 or DFSORT R14 PTF UQ95213 (available now), you can now convert larger ZD, PD, FS, FI and BI fields: up to 31 bytes for ZD, up to 16 bytes for PD, up to 32 bytes for FS, and up to 8 bytes for FI and BI. So p,10,ZD,BI will work just fine.
For complete information on all of the new DFSORT and ICETOOL functions available with these PTFs, see:
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum