× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




This looks like an answer in visual basic; maybe that will help.

http://mathforum.org/library/drmath/view/51910.html

I assume you do not want output like '90/100' and '45/100'; you want them
simplified.

Scott Lindstrom




"Austin, Mark"
<Mark.Austin@umus
ic.com> To
Sent by: "cobol400-l@xxxxxxxxxxxx"
cobol400-l-bounce <cobol400-l@xxxxxxxxxxxx>
s@xxxxxxxxxxxx cc

Subject
12/01/2009 09:29 [COBOL400-L] Fractions ... help!
AM


Please respond to
COBOL Programming
on the
iSeries/AS400
<cobol400-l@midra
nge.com>






Hi all,

I have an interesting problem to solve and not being a mathematician I'm
looking for some help.

I have got a number of records on a file which each have a percentage. I
need to read these records and output the percentage, as a fraction, in two
fields (a numerator and a denominator). The denominator needs to be the
same for each record but cannot be greater than 999 (as the denominator
field length is 3).

Has anyone else had to do anything like this? Any pointers would be
appreciated.

This is going to be written in ILE COBOL.

For example,

9.95%
2.19%
2.18%
0.21%
0.90%
0.45%
0.19%
0.18%
17.50%
50.00%
4.38%
4.37%
7.50%

Best regards,

Mark


________________________________
"**Confidentiality**
The information contained in this e-mail is confidential, may be privileged
and is intended solely for the use of the named addressee. Access to this
e-mail by any other person is not authorised. If you are not the intended
recipient, you should not disclose, copy, distribute, take any action or
rely on it and you should please notify the sender by reply. Any opinions
expressed are not necessarily those of the company.

We may monitor all incoming and outgoing emails in line with current
legislation. We have taken steps to ensure that this email and attachments
are free from any virus, but it remains your responsibility to ensure that
viruses do not adversely affect you.
--
This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing
list
To post a message email: COBOL400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/cobol400-l
or email: COBOL400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/cobol400-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.