| Not interested in regular college? Try Distance Education |
|
Home / Test Papers / IGNOU / CS03 File Structure and Programming in Cobol CS03 File Structure and Programming in Cobol June 2005 | Ask a question Print this page |
PGDCA / MCA (I Yr) / BCA
Term-End Examination
June, 2005
CS03 : File Structure and Programming in Cobol
Time: 2 hours
Maximum Marks: 60
1. (a) What is the purpose of an IF statement in COBOL ? Write the general format for class, compound and condition-name condltions. Give an example for each. (4)
(b) Write the use of the following COBOL verbs with the help of one example each : (6)
(i) WRITE
(ii) USAGE
(iii) GO TO
(c) Four data names A, B, C, D have the following data descriptions :
77 A PIC 9(4) VALUE 1921 77 B PIC 9(2) v 9(2) VALUE 12.12 77 C PIC 999 v 9(2) VALUE 248.44 77 D PIC 9(2) v 99 VALUE 28.8
What will the contents of A, B, C, D be after the execution of each of the following statements? (5)
(i) ADD A, B, C GIVING D ROUNDED
(ii) COMPUTE Y = A**Y + (D + C)*2
(iii) COMPUTE Z = (C - B)*3 - (A- D)
(iv) COMPUTE B INTO D GIVING A ROUNDED
(v) MULTIPLY D BY 13 GIVING B ROUNDED ON SIZE ERROR MOVE 10 TO D
(d) The University Administrative Block contains the following information in a table :
(i) Registration Number
(ii) Course Code
(iii) Student's Name
(iv) Student's Marks in 5 subjects for 6 semesters
(v) Student's Grade
Create the data division for the processing of thuis data. (5)
(e) Write the general formats for "STRING" and "UNSTRING" statements. A field named NAME contains 50 characters. Write a COBOL statement to change all instances of "SHRI" by "MR" and "SMT" by "MS". (5)
(f) How are READ and WRITE statements used in relative file organization ? Write all the different formats of READ and WRITE. (5)
Write a program in COBOL for the Central Library to read data in the following format :
1-5 Book Code
6 - 25 Title
26 - 30 Price
31 - 40 Publication
41 - 50 ISBN
51 - 55 Category
56 - 60 Edition
60 - 65 Month of procuring
The program should ensure that :
(i) Book Code is within the range 00001 to 19999
(ii) Price is a positive number
(iii) Title is not blank
(iv) ISBN should contain only numbers
AIso calculate the money spent in a given month for the procurement of books. (10)
3. (a) A Sports Club maintains the following master file for the major items used in sports :
| Item Code | 6 characters |
| item Name | 20 characters |
| Supplier Code | 6 characters |
| Price | 8 decimal digits |
| Number of ltems | 6 decimal digits |
| Item Code | 6 characters |
| Received/issued | 1 character |
| Date of transaction | 8 characters |
Write a progam in COBOL to update the number of items in the moster file using the transaction file. (10)
4. A manufacturing organization has employed permanent persons on a fixed scale, and temporary workers are paid on an hourly basis. Write a program to calculate the monthly payment for both temporary and permanent employees. (10)
5. Explain the use of the following COBOL verbs/statements with the help of one example each: (10)
(a) FILLER
(b) PERFORM
(c) SYNCHRONIZED
(d) SUBTRACT
(e) REWRITE
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