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 are the different rules of SORT operation?
How to remove 2 duplicate records and copy only one using job control language?
How do you reference the following file formats from cobol programs?
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
how do you reference the rrds file formats from cobol programs
i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?
Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.
Explain how to differentiate call by context by comparing it to other calls?
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
HOw can I get the negative sign while deduct high value from low value
which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad
How do define dynamic array in cobol.