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

Divide Function


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
smadiraju

New User


Joined: 19 Dec 2008
Posts: 3
Location: Chennai

PostPosted: Thu May 13, 2010 5:22 pm
Reply with quote

Require information like how it calculates the values of X???

X= fixed dec (6,2)

X = ROUND (DIVIDE ((A * 100),B,8,5),4);

A= 00000000048.29
B = 00000001609.74

X = ?????
Back to top
View user's profile Send private message
donateeye
Warnings : 2

New User


Joined: 01 Jun 2007
Posts: 62
Location: chennai

PostPosted: Thu May 13, 2010 5:47 pm
Reply with quote

Answer is 2.9999


divide has four parameters :
1 - number from which divide should happen
2 - number to divide
3 - number of digits before the point
4 - number of digits after the point


and Round makes it to the specified digits.. in this case its 4, so it cuts till 4 digit depending on the fifth (if exists) digit, that is, if the 5th digit is >5 then fourth digit will be added to one.

Please correct me anyone if I am wrong..
Back to top
View user's profile Send private message
smadiraju

New User


Joined: 19 Dec 2008
Posts: 3
Location: Chennai

PostPosted: Thu May 13, 2010 6:15 pm
Reply with quote

Thanks for your response.
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 -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Calling an Open C library function in... CICS 1
No new posts DATE2 function SYNCSORT 15
No new posts Help on PL/I jsonPutValue function PL/I & Assembler 8
No new posts how to use Tso outtrap external function All Other Mainframe Topics 8
No new posts INSYNC option with same function as I... JCL & VSAM 0
Search our Forums:

Back to Top