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 Purpose of Pointer in the string?

1125


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.

6667


which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad

1550


Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc

1309


Write a program that uses move corresponding.

1208


Mention the guidelines to write a structured cobol program?

1142


Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?

1209


How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that

3277


A table has two indexes defined. Which one will be used by the SEARCH?

1328


What are the different types of condition in cobol and write their forms.

1152


What are the various section in data division and briefly explain them.

1251


What are the different rules for performing sort operation?

1280


What is rmode(24)

1196


What are the rules of the move verb?

1322


IF I mention stop run in CICS what happens?

2427