| 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 December 1997 | Ask a question Print this page |
PGDCA / MCA (I Yr) / BCA
Term-End Examination
December, 1997
CS03 : File Structure and Programming in Cobol
Time: 2 hours
Maximum Marks: 60
1. (a) Compare and contrast the indexed file organization with the Relative file organisation. Suggest the types of applications where Relative file organisation will be preferred over indexed file organisation
(b) How do you implement iteration in COBOL? Give two examples. Can you write recursive program in COBOL? Justify your answer.
(c) How can you sort the values stored in a single dimensional array in COBOL? Explain with the help of an example.
(d) What is the purpose of INSPECT statement in COBOL? Explain with the help of examples.
(e) Compare and contrast the MOVE and Group MOVE statement of COBOL, with the help examples.
(f) Why do we use files to perform Input-Output to COBOL program? Explain various Input-Output statement of COBOL with the help of one example each.
2. The Sugar Exporter Co-operative works in a distributed environment as they are associated with a number of plants situated all across India. On receiving an export order, the Co-operative distributes the order to some of its plants. Assume that there are only three plants that all these plants keep records of their production in COBOL in the following format:
Sugar Quality : 2 digits Quality : 5 numeric digits Export Order No. : 6 alphabets Order date : 8 digits Date of Completion of Order : 8 digitsWrite a program in COBOL which merges the data from these three plants to one single master file.
Please notes:
(i) The files received from the plants are sorted on the field "Date of Completion of Order".
(ii) The master file (which is to be generated) is sorted on the field "Order Date".
(iii) The date of completion of order in the single master file will be the highest of the date of completion received from plants.
3. ABC Bank keeps accounts of its customers using a COBOL program. the structure of their master file is:
Account Type 2 characters Account Number 5 numeric digits Name 25 characters Address 50 characters Balance 6 numeric digits Last withdrawn on 8 digitsThis master file is used for daily transactions of the customers Every time a customer withdraws money his master should be updated. Write a program in COBOL for updating the master file on customer withdrawals on-line. Indicate the file organisation you have chosen. Give reasons for doing so.
4. Explain the following COBOL statements/verbs/clauses giving one example for each:
(i) LABEL RECORDS5. (a) Write a program in COBOL for printing the Fahrenheit equivalent of Celsuis temperature in the range of 0 to 150 F at 10 interval. The conversion formula to be used is: Celsius = 5/9 (oFhrenheit - 32)
(b) Identify the error/errors, if any, in the following COBOL statements. give reasons.
(i) PERFORM PARA_X UNTIL CTR = 8 PARA_X ADD X TO Y. ADD 1 TO CTR. IF CTR= 8 STOP RUN (ii) IF A = 5 OR IF A = 8 PERFORM PARA-II END_IF. (iii) ADD X, Y, Z GIVING A ROUNDED ON SIZE ERROR MOVE BLANK TO C. (iv) MOVE AMT1 TO 1000. MOVE 'ABC', ABT2 TO AMT3 (v) PERFORM PARA_Z THRU PARAC VARYING Z1 FROM 1 UNTIL X1 < 100. PARA_Z PARAC
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