|
From: | Patrick |
Subject: | Re: [open-cobol-list] From screen to calculation. |
Date: | Fri, 06 Feb 2015 10:49:53 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 |
Hi JohnYou probably have several decades with COBOl while I have 2 years part time but here goes anyways....
Can you use a PIC clause in the screen section to display the data as $1.00 etc but then move the data to a working storage field suitable for calculations?
-Patrick On 15-02-06 09:41 AM, John Culleton wrote:
Many programs require data entry in the form of dollars and cents, which data is later used in calculations. The form in which dollars and cents is used in calculations is something like -9999v99. But the form in which most people will key it is 9999.99 which cannot be used in calculations. There are many possible solutions. One can ask the user to key in 999999 and then immediately multiply by .01; the two fields (dollars and cents) can actually be two fields next to each other, or some other solution I haven't thought of and so on. What is your preferred method?
[Prev in Thread] | Current Thread | [Next in Thread] |