IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

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: 7312
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: 2429
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 All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts Join lines with dfsort DFSORT/ICETOOL 5
No new posts Covert k to 1000 / m to 1000000 using... DFSORT/ICETOOL 5
No new posts DFSORT Output file order query DFSORT/ICETOOL 2
This topic is locked: you cannot edit posts or make replies. DFSORT-How to convert ZD to ZS in DFSORT DFSORT/ICETOOL 2
No new posts DFSORT to handle in between specific ... DFSORT/ICETOOL 6

Back to Top