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...

How to read records which is in sequential file in reverse
order ? Exp. 1 2 3 4 5 . i want 5 4 3 2 1?please clear my
doubt any one

Answer Posted / abhishek

i am giving you pseudo code of same
suppose we have 5 records

rec-no 1-->10
rec-no 2-->1
rec-no 3-->25
rec-no 4-->35
rec-no 5-->20

read sequential file to get record count of file

close file

define an array whose size is equal to record count of file


open file

read file in loop

move current record of sequential file to last subscript of
array define above ( this can be taken care using perform
varying)

read the array starting from subscript 1 to record count

this will be similar to reading sequntial file in reverse
order.....


thanks,

Abhishek

Is This Answer Correct ?    23 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is length is cobol?

1083


Why occurs cannot be used in 01 level in COBOL?

1150


Whats the difference between search & search ALL?

6487


Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?

1335


How do you differentiate between cobol and cobol-ii?

1183


What is an in line perform? When would you use it? Anything else you wish to say about it.

1053


what is s000 u4087 error? please give the all error codes in cobol,jcl.

17846


If you are current on the owner of a set, what is the difference between obtain next and obtain first?

1319


i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com

2202


explain sorting techniques in cobol program?

1175


how do you reference the ksds vsam file formats from cobol programs

1156


What is the usage of comp fields in cobol?

1163


How to remove 2 duplicate records and copy only one using job control language?

1202


What is the difference between next sentence and continue in cobol programing language?

1195


What is Pic 9v99 Indicates in COBOL?

1237