Comp-3 conversion using Sort giving error



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Comp-3 conversion using Sort giving error

Postby bhigi » Wed Jul 22, 2009 4:18 pm

Hi,

I am trying to compress signed number to comp-3 format using IBM sort

The input data is

+00000000000.04
+00000000000.05
+00000000000.06
+00000000000005

and cntl card is

OUTFIL FNAMES=SORTOF7,FTOV,VLTRIM=X'40',
INCLUDE=(1,3,CH,EQ,C'D06'),
OUTREC=(1,28,
29,15,SFF,TO=PD,LENGTH=8)

In the output file , all the numbers comes correctly except the ones ending with 5 .

0.04

0.06


When try to see hex value it gives as given below

44000000044
000000000C0
-----------

44000000044
00000000000
-----------
%
44000000064
000000000C0

Please help me understand what is special about 5 and why is it not getting converted to packed format using sort.
bhigi
 
Posts: 1
Joined: Wed Jul 22, 2009 4:14 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Comp-3 conversion using Sort giving error

 

Re: Comp-3 conversion using Sort giving error

Postby Frank Yaeger » Wed Jul 22, 2009 8:51 pm

Your input doesn't seem to match your control statements. Since you have an INCLUDE for 'D06', I would expect you to have 'D06' in positions 1-3. And since you have 29,15,SFF,... I would expect you to have the amount starting in position 29. So the input would really look something like this:

----+----1----+----2----+----3----+----4----+-
D06                         +00000000000.04   
D06                         +00000000000.05   
D06                         +00000000000.06   
D06                         +00000000000005   


When I run your DFSORT control statements against that input, I get the correct PD values in the output starting in position 33 (29+4 for the RDW you added). Here's what I get in hex:

0000000000000004C
0000000000000005C
0000000000000006C
0000000000000005C


So either you're specifying the positions wrong or your input doesn't match your control statements or you're not checking the correct positions in the output or there's something else you're not doing or explaining correctly.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post