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
what is the difference between COBOL2 AND COBOL390?
What is report-item in COBOL?
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?
How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
What is Pic 9v99 Indicates in COBOL?
How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?
if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need
Name some of the examples of COBOl 11?
What is perform what is varying?
What is inspect in cobol ?
What is the difference between structured cobol programming and object alternativelyiented cobol?
) how do u code after getting data?
System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..