|
Home / Test Papers / IGNOU / CS03 File Structure and Programming in Cobol CS03 File Structure and Programming in Cobol December 2001 | Ask a question Print this page |
PGDCA / MCA (I Yr) / BCA
Term-End Examination
December, 2001
CS03 : File Structure and Programming in Cobol
Time: 2 hours
Maximum Marks: 60
1. (a) A company has two types of employees : Full time and part time. The company stores the basic information such as name, address, age of all its employees. In addition, the information basic pay is stored for full time employees while daily wages are stored for part-time employees. Write the data division for the company. Please keep in mind that company wants to keep a single file for all its employees. Write procedure division for printing the employee details as a list (irrespective of full time or part time employee). The details will contain information relating to pay.
(b) A two dimensional table is to be represented in COBOL. Describe how it can be done, with an example. How can this table be searched for some specific value?
(c) Suggest an application where you would like to prefer relative file organisation than that of indexed sequential organisation. What are the various COBOL verbs used for relative organisation?
(d) "The best way to solve a problem is to modularise it." Comment on the above statement. How can modularisation be achieved in COBOL? De scribe with the help of an example.
(e) Why does COBOL have a working storage section? What are the various levels of working storage section? Give example of at least two.
2. Marks of students in various subjects. (maximum four) are kept in a Master file as:
Student no. 9 Numeric digits Name 25 characters Subject 1 Marks 3 characters Subject 2 Marks 3 characters Subject 3 Marks 3 characters Subject 4 Marks 3 characters Key : Student no.
A transaction file of marks is created for various subjects as:
student no. 9 Numeric digits subject code 1 digit (1, 2, 3 or 4) marks 3 characters
Write a program in COBOL to update the master file from the transaction file. Make suitable assumptions. In case a student no. in transaction file is not found in master then an error message should be produced. Select suitable file organisation.
3. Write a program in COBOL to create an indexed sequential file from a disk file. The format of the disk file is:
emp_no 5 numeric digits emp_name 25 characters date_of_birth 8 characters basic_salary 8 numeric digits
Select the key of the file as emp_no. How will you list all the employee details who share a common date of birth? Make suitable assumptions, if any.
4. Describe the following COBOL verbs with the help of one example each:
(a) SET statement
(b) INVALID KEY clause
(c) Various formats of MOVE statement
(d) PERFORM statement with VARYING and GIVING options
(e) INSPECT statement
5. Write a program in COBOL to merge two files having the following format:
The format for both the files is :
item_code 10 characters item_name 25 characters item_quantity 10 numeric digits
Please note the files may have an item whose item_code exists in both the files. In such case the item_quantity for that item should be added.
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