DIV giving weird results in SORT



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

DIV giving weird results in SORT

Postby ROHIT5073 » Thu Jan 03, 2019 4:42 pm

Input is:

0200000 0000000 0131500 0019116
(1,7) (8,7) (15,7) (22,7)


//SYSIN    DD *                                                  
 SORT FIELDS=COPY                                                
 OUTREC FIELDS=((8,7,ZD,ADD,15,7,ZD,ADD,22,7,ZD),DIV,(1,7,ZD))


Is giving 0 result. Rather the result should be .75

SORT Gurus, Please help!
ROHIT5073
 
Posts: 2
Joined: Thu Jan 03, 2019 4:34 pm
Has thanked: 0 time
Been thanked: 0 time

Re: DIV giving weird results in SORT

Postby enrico-sorichetti » Thu Jan 03, 2019 6:16 pm

NO ! ...
it gives exactly what You asked for
DFSORT deals only with INTEGERS, You will have to deal with the decimal part Yourself

for two decimals

multiply the dividend by 100
divide
format the result
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: DIV giving weird results in SORT

Postby ROHIT5073 » Thu Jan 03, 2019 6:29 pm

Thanks a lot enrico. I got the right result. Appreciate your help!
ROHIT5073
 
Posts: 2
Joined: Thu Jan 03, 2019 4:34 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post