Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can any body help me

Status
Not open for further replies.

mnaveen99

Programmer
Aug 31, 2002
1
IN
Can any body give the solution for the following Cobol problem as I am new to the language.

1) Write a program in cobol that calculates monthly salary of the employee's of a company. The records of all the employees are kept in a single file. The empoloyees salary is to be calculated on the basis of following formula.

Payment to the Regular Staff :
Payment to be made = Basic Salary (1+ Dearness Allowance %
100 )
- (Provident Fund + IncomeTax subscription by employee)

Payment to Part time staff :
Payment = No. of days worked in the month x Daily wage of that employee

Assume suitable file format. Make and state suitable assumptions if any.
 
mnaveen99,

The best way to learn COBOL (or any other language) is by actually coding it. Your homework can be done if you give it a little effort.

Break up your problem into little pieces and solve them one by one. For example:

1. Describe what you want the output to look like: headers, detail lines, names, hours worked, calculated salary, etc...

2. What input/record layout do you need to produce the above output: name, hours, etc...

3. Based on the above, supply the coding requirements for these: IDENTIFICATION DIVISION, ENVIRONMENT DIVISION, DATA DIVISION, WORKING-STORAGE SECTION, PROCEDURE DIVISION.

4. Design a coding strategy: open file, read record, calculate salary, write report, read next record,...

Let us know how you are progressing.

Dimandja
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top