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
EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?
What are various search techniques in cobol? Explain.
Write the code implementing the perform … varying.
How to print 10 to 1 if the input have only 10 digit number?
I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......
What are the cobol coding sheets?
What is the usage of comp fields in cobol?
)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?
Why did you choose to work with ibm mainframe cobol programming?
What type of SDLC u followed? Why?
What are all the divisions of a COBOL program?
How do you get the data to code the BMS macro?
What is a report item?
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
What rules are followed by the search verb.