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

please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?

2402


how do you reference the variable block file formats from cobol programs

1181


What is the difference between goback, stop run and exit program in cobol?

1520


what is the difference between COBOL2 AND COBOL390?

2985


Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning

1041


For rewrite, why is it mandatory that file needs to be opened?

1060


example for sub strings ? and refernce modifications whit output pls

2264


What is the difference between binary search and sequential search?

1043


What rules are followed by the search verb.

1044


What are INPUT PROCEDURE and OUTPUT PROCEDURE?

1220


what is amode(24), amode(31), rmode(24) and rmode(any)?

1091


Write some characteristics of cobol as means of business language.

1078


There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.

1380


Write a program that uses move corresponding.

1071


Differentiate between structured cobol programming and object-oriented cobol programming.

1074