HP3000-L Archives

May 1999, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Jim Phillips <[log in to unmask]>
Reply To:
Jim Phillips <[log in to unmask]>
Date:
Tue, 11 May 1999 12:47:56 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (49 lines)
Efren Castro wrote:
>
> Hi everyone,
> I am currently working on a BONUS program in COBOL.  I
> need some kind of formula to figure out my problem, but
> I just cant figure it out. Maybe some of you can come
> up with something.  Heres the problem.
>
> Minimum to be given = $500.00
> Maximum to be given = $1500.00
> Total Budget = $75,000.00
> Total Employees = about 80
>
> Any employee who misses over 160 will not qualify for
> bonus. any help will be appreciated.

How about:

Total_Employee_Hours = sum (employee_hours_worked_for_the_year)
Total_Bonus = 75000

Perform Until No_more_employees

   If Total_Bonus < 0
      Error
   End-if

   If employee_hours_worked_for_the_year > 1920 [2080 - 160]
      Bonus = 75000 * (employee_hours_worked_for_the_year /
Total_Employee_Hours)
      If Bonus < 500
         Bonus = 500
      Else
         If Bonus > 1500
            Bonus = 1500
         End-if
      End-if

      Total_Bonus = Total_Bonus - Bonus
   End-if      

End-perform


Jim Phillips                            Manager of Information Systems
Voice: (330) 527-2124                   Therm-O-Link, Inc.
  Fax: (330) 527-2123                   PO Box 285; 10513 Freedom St.
Email: [log in to unmask]       Garrettsville, Ohio  44231

ATOM RSS1 RSS2