| Looking for new friends? Find one today at Asuku.com |
|
Home / Test Papers / IGNOU / CS03 File Structure and Programming in Cobol CS03 File Structure and Programming in Cobol June 1995 | Ask a question Print this page |
PGDCA / MCA (I Yr) / BCA
Term-End Examination
June, 1995
CS03 : File Structure and Programming in Cobol
Time: 2 hours
Maximum Marks: 60
1. (a) Which of the following picture specification are incorrect? Give reasons.
(i) $9 (9) Z.99
(ii) Z (5). Z999
(iii) A (5) 000
(iv) 99V99.99
(v) B (5)
(b) What is a USAGE clause in COBOL? Explain it with examples.
(c) What will be the results on execution of each statement in the Procedure Division of the following program segment?
01 COUNTER 1 PIC 999 VALUE ZEROS
01 NAME PIC X (15) VALUE 'PARMANAND JEE'
PROCEDURE DIVISION
INSPECT NAME REPLACING ALL 'A' BY 'E'
INSPECT NAME TALLYING COUNTER FOR ALL 'E'
INSPECT NAME REPLACING ALL 'E' BY 'A' AFTER INITIAL 'A'
(d) How can we do SORTING in COBOL?
(e) What is an indexed file in COBOL? Explain the access modes in which records of an indexed file can be accessed.
(f) The values of 4 variables A, B, C, D in COBOL program is:
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 contents of A, B, C, D on execution of each of the following instructions?
(i) DIVIDE A INTO D GIVING C REMAINDER D.(g) Find out the possible errors in the following program segments.
(i) 05 FIRST.
07 PART1 PIC X (15). 07 PART2 PIC X (5) 06 SECOND REDEFINES FIRST 07 SPART1 PIC 9(15) 07 SPART2 PIC X (4)
(ii)
————— OPEN FILEA, FILEB ——————— ——————— IF A IS MORE THAN B. MOVE B TO C
(h) What is a size error? Where can we use size error clause? Give an example of such case/cases.
2. What is a Relative file organisation? Explain the access modes used for Relative file organisation. Discuss with example the various Procedure Division entries for this organisation.
3. (a) The formula for conversion of temperature from Fahrenheit to a Celsius is Celsius =5/9 (Degree fahrenheit-32) Write the Data Procedure Division of a COBOL program which takes input from a file containing temperature date in Fahrenheit, and output the temperature in Celsius.
(b) Write the Data Division and Procedure Division of a program in COBOL, which chooses the largest of five numbers.
4. Find the error, if any in the following COBOL statements. Give reasons.
(i) PRINT NAME 1
(ii) ACCEPT (3,5) SUM WITH PROMPT
(iii) GOTO PARA1 THRU PARA2
(iv) PERFORM PARA1 TEN TIMES
(v) IF CODE1 IS =5 PERFORM PARA5
(vi) 88TDAY PIC X (25) VALUE 'XYZ'
(vii) 77 ITEM I PIC A (3) VALUE A12
(viii) STOP RUNNING
(ix) IF COUNTER GOTO PARA1
(x) MOVE FIRST, SECOND TO THIRD.
5. Record of the marks obtained in 20 different subjects of a class of 50 Students is kept table as per the following structure:
Registration Number : 10 Decimal digits Name : 20 Alphabets Subject Name (for each of the 20 subjects) : 20 Alphabet Marks in a subject : 3 Decimal digits
Write the Data Division and Procedure Division of COBOL program for:
(a) Finding the marks of a particular student (let us say: NME = 'RAMESH') in a particular subject (let us say: Subject Name = 'COBOL').
(b) Finding the total marks obtained by a particular student.
(Hint: The name and subject name are to be read from the keyboard in both the above cases)
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