Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Divide Function

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
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    Post subject: Divide Function
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the Extract Function in JCL dharmaraok JCL & VSAM 3 Wed Jun 14, 2017 9:12 am
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am
No new posts Strange EXEC function call in z/VM Willy Jensen CLIST & REXX 3 Wed Oct 05, 2016 2:07 pm
No new posts Replace function abdulrafi COBOL Programming 13 Mon Sep 12, 2016 10:12 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us