Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to use DIV arithmetic operation in DFSORT?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
youayshu
Currently Banned

New User


Joined: 07 Nov 2006
Posts: 13
Location: Thiruvanathapuram

PostPosted: Wed Mar 28, 2007 4:56 pm    Post subject: How to use DIV arithmetic operation in DFSORT?
Reply with quote

Hi all.........

I tried to divide using DFSORT...............
using the following syntax....
OUTREC FIELDS=(1,4,2C' ',9,3,(9,3,ZD,DIV,+2))

but it dint work properly....

the expected result was 1.5(3div 2). But instead we got 0.01....

How to resolve this?

Please suggest a solution at the eraliest.......
Thanking you
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Mar 28, 2007 8:41 pm    Post subject:
Reply with quote

Quote:
the expected result was 1.5(3div 2). But instead we got 0.01


Huh? DFSORT's DIV returns an integer value. +3,DIV,+2 would give 1 as the result. I don't know why you say you got 0.01 unless you edited the result of 1 to get that. If you want a result with one decimal place, you need to multiply by +10 and then divide by +2, e.g. (+3,MUL,+10),DIV,+2 would give a result of 15 which you could then edit to 1.5.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm
No new posts Joinkeys operation when key1 and key2... Susanta DFSORT/ICETOOL 5 Wed Nov 02, 2016 5:35 pm
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts Joinkeys operation betwen VB and FB file Susanta SYNCSORT 4 Sun Sep 25, 2016 9:49 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us