| Not interested in regular full time college? Try Distance Education |
|
Home / Test Papers / IGNOU / CS03 File Structure and Programming in Cobol CS03 File Structure and Programming in Cobol June 2007 | Ask a question Print this page |
PGDCA / MCA (I Yr) / BCA
Term-End Examination
June, 2007
CS03 : File Structure and Programming in Cobol
Time: 2 hours
Maximum Marks: 60
1. (a) Write the data and procedure division of a COBOL program which takes input from a file containing temperature data in Fahrenheit and outputs the temperature in Celsius. (10)
Note : The formula for conversion is
Celsius - : 5/9(Degree Fahrenheit - 32)
(b) Find the errors, if any, in the following COBOL statements. Give reasons and also write the correct statements respectively. (10)
(i) 77 ITEM I PIC A(3) VALUE A12
(ii) .STOP RUNNING
(iii) GOTO PARA1 THRU PARA2
(iv) ACCEPT (3,5) SUM WITH PROMPT
(v) PRINT NAME 1
(c) What is relative file organization ? Explain all the access modes used for it. Also discuss with an example the various procedure division entries for this organization. (10)
2.(a) What is the role of a search statement in COBOL ? How does this statement operate on data ? Explain it with the help of an example. (5)
(b)Write the data and procedure divisions of a COBOL program for sorting an array of 10 elements using any of the sorting techniques. (5)
3.(a) The payroll record of some XYZ Company has the following structure :
Emp Number :4 digits
Emp Name : 25 characters
Emp Pay :6 digits
Write a suitable data division of a COBOL program for this company. The company has decided to increase the pay of its employees as per the following norms :
| present pay | increment |
| Pay < 3000 | 15% increase in pay |
| pay >= 3000 and <= 8000 | 10% increase in pay |
| pay >8000 | 8% increase in pay |
Also, write the procedure given changes in the pay division to implement the structure. (5)
(b) What is the purpose of synchronised clause in COBOL ? What are the situations in which you would like to use this clause ? Explain briefly with an example. (5)
4. (a) Write the data division and procedure division of a COBOL program which calculates the yearly depreciation as per the following formula :
Yearly depreciation = (cost of item - scrap value)/life
The input record to the program consists of the item number, cost of the item, scrap value and life in years. Also, it should print "ERROR" if depreciation value is less than or equal to zero. (5)
(b) Two sorted transaction files are to be merged on a specific key. Write the various data division and procedure division entries which are required to do this operation (5)
(Note : You can assume any key os speciifc key)
5. Write the syntax format for each of the following COBOL statements/verbs/clasues with the help of an example : (10)
(a) ACCEPT and DISPIAY
(b) CORRESPONDING option with MOVE and ADD verbs
(c) RELEASE and RETURN
(d) ON SIZE ERROR
(e) REDEFIN
Business Schools - Engineering Colleges - Medical & Nursing Admissions - BEd in Distance mode - Journalism & Media Studies - Forensic Science
Enter a detailed keyword. Ex: Question Papers of IGNOU MCA Ist Semester