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
For rewrite, why is it mandatory that file needs to be opened?
how can i see junk values in dclgen or in hostvariable of comp ?
Write the code to count the sum of n natural numbers.
What is the difference between comp and comp-3 usage?
What is the difference between binary search and sequential search?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?
what is the difference between COBOL2 AND COBOL390?
How do we get current date from system with century in COBOL?
What are the different open modes available in cobol?
) How do u handle errors in BMS macro?
write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc
Explain what you understand by passing by value.
What are the rules of the move verb?
I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?
What is the Purpose of POINTER Phrase in STRING command in COBOL?