Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 Help Members By Posting Answers For Below Questions

Why is it necessary that file needs to be opened in I-O mode for REWRITE?

1333


What are literals?

1149


Write some characteristics of cobol as means of business language.

1150


Explain what you understand by passing by value.

1166


What is the local-storage section?

1156


What are all the divisions of a COBOL program?

1220


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)?

1121


What is cobol?

1247


What are the access modes of START statement?

1280


How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.

4177


What is a SSRANGE and NOSSRANGE?

1479


what happens if parmparameter passes zero bytes to the program

2143


How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?

1210


Define cobol?

1414


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.

6596