|
Home / Test Papers / IGNOU / CS03 File Structure and Programming in Cobol CS03 File Structure and Programming in Cobol December 1996 | Ask a question Print this page |
PGDCA / MCA (I Yr) / BCA
Term-End Examination
December, 1996
CS03 : File Structure and Programming in Cobol
Time: 2 hours
Maximum Marks: 60
1. (a) What is a Label Records? Explain the meaning of the clause:
LABEL RECORDS ARE STANDARD
(b) Write the Data Division and Procedure Division entries to print and underline the heading "This is a Term End Exam" form the 4 1st column. Use ADVANCING option.
(c) Write the Data Division and Procedure Division entries to print and underline the heading "This is a Term Exam" from the 41st column. Use ADVANCING option
PERFROM PARA-A VAYRING A FROM 1 BY 1 UNITL A> 20. PERFROM PARA-B 8 TIMES. PERFROM PARA-C UNITL = 8 PARA – A ADD C TO B ADD 1 TO A PARA – B IF A = B GOTO PARA-D ADD A TO B. PARA – C ADD A TO B. ADD 1 TO CTR. IF CTR = 8 CTR RUN. PARA – D ADD 5 TO B. STOP RUN
(d) 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 the 5 suppliers. Write the data division entry for this multidimensional table.
Write the procedure division entries for finding the number of products in Warehouse 3 that have been supplied by "ABC Company"
(e) Can you write recursive program in COBOL? Give reasons. What are the COBOL verbs used for implementing iteration?
(f) Compare and contrast indexed sequential file organisation and Relative file organisation.
(g) How can sort records in a file using COBOL? Explain with the help of an example.
2. Write a COBOL program for updating a stock master file (sequential) using a transaction file. The stock file records consist of:
Item number 5 Numeric digits Item name 25 Alphabets Quantity 9 Numeric digits The transaction file consists of Item number 5 Numeric digits Quantity 9 Numeric digits
3. A chemical company has two plants. Each of the plants has its own unsorted employee payroll master file having the format:
Employee Number 5 Numeric digits Employee Name 25 Characters Address 50 Characters Pay 6 Decimal digits
The company found that many of its employees are on the payroll of both the plants. Write a program in COBOL to create a single master file for the company. There should not be any duplicate records in the single master file.
4. (a) Identify the error/errors in the following COBOL statements. Give reasons.(i) ADD AMTI TO AM2 GIVING TOTAL
(ii) DIVIDE AMT BY 6 REMAINDER REM.
(iii) COMPUTE (A + E) = A* B / *C +
D
(iv) ACCEPT (5, 15) SUM WITH PROMPT
(v) IF A = 3 OR IF A = 4
PERFROM PARA-A
ENDIF.
(b) Write a program in COBOL (only Data Division and Procedure Division) to output patient name and diagnosis as per the following conditions:
(i) If a patient has lung infection and high fever, the diagnosis is PNEUMONIA
(ii) Any other combination of two or more symptoms (which do not include using infection, high fever pair), the diagnosis is COLD.
(iii) If a most one symptom is present then patient is OK.
The patient records has the following format:
Name 20 characters 1 specifying presence of symptom
Lung Infection 1 digit 0 specifying absence of symptom
Temperature 1 digit 1 implies high
0 implies normal
Sore throat 1 digit 1 means present
0 means absent
5. Explain the following by taking one example each:
(i) INVALID KEY clause
(ii) INSPECT statement
(iii) MOVE CORRESPONDING statement
(iv) ON SIZE ERROR clause
(v) SEARCH ALL statement
(vi) SET statement
(vii) USAGE clause
(viii) REDEFINES clause
(ix) PICTURE clause
(x) SYNCHRONIZED clause
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