IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to get the remainder and quotient from a DIV in DFSORT ?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vnktrrd

New User


Joined: 12 Jan 2010
Posts: 34
Location: New York

PostPosted: Mon Oct 31, 2016 10:59 am
Reply with quote

Hi,

I want to divide an amount field and store the remainder and quotient of the division operation next to the data. Please advise using DFSORT/ICETOOL.

Thanks,
Ramana.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Oct 31, 2016 11:58 am
Reply with quote

DIV will give you the simple quotient.

For the remainder, look to calculate it from that (multiply quotient by divisor, then subtract from dividend).

You could look at MOD. Two things against it: whines of "I don't want the modulus, I want the remainder"; two divides are slow; whining about "but I'm only doing one divide" (there are always three things).
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2454
Location: Hampshire, UK

PostPosted: Mon Oct 31, 2016 4:13 pm
Reply with quote

Why ask in the JCL forum and not in the DFSort forum?
Moved.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Date format correction using dfsort DFSORT/ICETOOL 3
No new posts DFSORT GUID DFSORT/ICETOOL 5
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top