Need help about a course? |
|
Home / Test Papers / IGNOU / CS03 (S) File Structure and Programming in Cobol CS03 (S) 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 S: File Structure and Programming in Cobol
Time: 2 hours
Maximum Marks: 60
1. (a) The values of 4 variables A , B, C, D in COBOL program are (10)
A PIC 99 VALUE 05.
B PIC 99V9 VALUE 22.5.
C PIC 99V9 VALUE 02.8.
D PIC 99 VALUE 25.
What will be the contents of A, B, C, D on execution of each of the following instructions ?
(i) DIVIDE A INTO B GIVING C REMAINDER D.
(ii) MULTIPLY A BY B ROUNDED.
(iii) ADD A,99 GIVING C ON SIZE ERROR MOVE O T O C .
(iv) SUBTRACT A,C FROM B.
(v) ADD A,B TO C GIVING D ROUNDED.
(b) Write the Data and Procedure divisions of a program in COBOL which chooses the largest among the five given numbers. (10)
(Note : You can ossum e any frue numbers)
(c) What is an indexed file in COBOL ? Explain the access modes in which records of an indexed file can be accesse. (10)
2.(a) Find the errors, if any, in the following COBOL statements. Give reasons also. (4)
(i) 88 TDAY PIC X(25) VALUE 'XYZ'
(ii) PERFORM PARA1 TEN TIMES
(iii) IF COUNTER < 15 GOTO PARA1
(iv) ADD AMT1 TO AMT2 GIVING TOTAL
(b) A transaction file has the following structure : (6)
Amount number 8 alphanumeric characters Transaction code 2 numeric digits Write the data and procedure divisions in COBOL which sorts these entries on account number in two files. The first file contains the entries for which translation code is less than or equal to 50. The second file contains the entries for which the translation code is rnore than 50, but at the time of writing into the file, it has to be converted to zero.
3. (a) XYZ company has 5 warehouses for keeping its stock. Each of, these warehouses stores 20 products and any of these products can be supplied by 5 suppliers. Write the data division entry for this multidimensional table. Write the procedure division entries for finding the number of products in the Warehouse-3 that have been supplied by "ABC Company". (5)
(b) Can you write recursive programs in COBOL ? Give reasons. What are the COBOL verbs used for implementing the iteration ? (5)
4.(a) How can you implement a multidimensional array in COBOL ? Explain with the help of an example. (5)
(b) Write a COBOL programt to calculate the compound interest from the disk records of the following structure : (5)
| Account No. | 5 character |
| Depositor's Name | 25 character |
| Amount | 5 digits |
| Rate of interest | 2 digits |
| Investment period | 2 digits |
Note : The formula to be used is
Compounded Amt= Amount (1 + (Rate of interest) /100)investrnent period
5. Explain the use and write the syntax of each of the following COBOL statements/verbs,/clauses with the help of an example : (10)
(a) USAGE clause
(b) ALTER
(c) EXT
(d) COMPUTE
(e) OCCURS clauses
Business Schools - Engineering Colleges - Medical & Nursing Admissions - BEd in Distance mode - Journalism & Media Studies - IGNOU
Enter a detailed keyword. Ex: Question Papers of IGNOU MCA Ist Semester