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

what is the difference between COBOL2 AND COBOL390?

3046


What is report-item in COBOL?

1149


What is the default value(s) for an initialize? What keyword will allow for an override of the default?

1113


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

1111


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?

2576


INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?

859


What is Pic 9v99 Indicates in COBOL?

1253


How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?

2463


if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need

1344


Name some of the examples of COBOl 11?

3136


What is perform what is varying?

1157


What is inspect in cobol ?

1292


What is the difference between structured cobol programming and object alternativelyiented cobol?

1238


) how do u code after getting data?

2147


System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..

2069