can we read records in a file from botom to top. if
possible how can we read
Answer Posted / kk
data division.
working storage section.
01 opr pic a(1).
01 arrays.
02 aaa occurs n times.
03 name attribute.
------------------
------------------
01 I pic 9(2) value 1.
procedure division.
open file
read file at end move 'n' to opt
perform para1 until opt = 'n'
perform para2 until i = 0
para1.
move filed to aaa
add i to i.
read file at end move 'n' to opt.
perform-end.
para2.
diplay aaa(I).
compute i=i-1.
perform-end.
stop run.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
how do you reference the variable block file formats from cobol programs
What is the difference between goback, stop run and exit program in cobol?
what is the difference between COBOL2 AND COBOL390?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
For rewrite, why is it mandatory that file needs to be opened?
example for sub strings ? and refernce modifications whit output pls
What is the difference between binary search and sequential search?
What rules are followed by the search verb.
What are INPUT PROCEDURE and OUTPUT PROCEDURE?
what is amode(24), amode(31), rmode(24) and rmode(any)?
Write some characteristics of cobol as means of business language.
There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.
Write a program that uses move corresponding.
Differentiate between structured cobol programming and object-oriented cobol programming.