MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DFSORT yield rate calculation

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
nachiyappan
Beginner


Joined: 08 Sep 2020
Posts: 8
Topics: 2

PostPosted: Sun Feb 28, 2021 11:08 pm    Post subject: DFSORT yield rate calculation Reply with quote

Hi, I have interest rate in a file in a fixed position. Is it possible to get the yield rate using DFSORT by performing the following formula

Yield rate = (((((interest rate / 100 ) / 365) + 1)^365) - 1) * 100

I am trying to replace a COBOL which is performing a simple move of selective fields from input and just performing this calc to be written to a new field in the output

I tried searching and doesn't seem to find an answer. If this is answered, then please refer to me that thread. Thanks in advance.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Mar 01, 2021 11:31 am    Post subject: Reply with quote

nachiyappan,

SORT products do NOT have the capability of doing the exponent. Moreover you also need to perform rounding which can be tricky with Sort products.

For example for an interest rate of 5% how do you round up? What is the yield rate 5.12675 or 5.127 ? or 5.13?
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nachiyappan
Beginner


Joined: 08 Sep 2020
Posts: 8
Topics: 2

PostPosted: Mon Mar 01, 2021 2:04 pm    Post subject: Reply with quote

Hi Kolusu,
Thanks for your quick reply. For example of 5% interest rate, the yield rate is 5.12675. Both interest rate and yield rate are PD . COBOL definition for both is PIC S9(03)V9(05) COMP-3. (Length is 5).

Thanks,
Nachi
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group