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 in reverse order in flat file?
I know we can do it by reading all records into an array....
Then read records in reverse order by using subscript or index
but can any body give me the exact code.

Answer Posted / narayan

You Can do it through JCL sort. Just add a seq number at the
last position of each record and sort it in descending order
of that seq number.
Here is the exacet code.
SORT FIELSD=COPY
OUTREC=(1,80,SEQNUM,4,ZD)
If your ps file is 80 byte long then this sort card a 4
digit seq num at 81 postion.
Now Sort the file on this seq num in descending
SORT FIELSD=(81,4,ZD,D)

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

i want a program using by if, evaluate , string, unstring, perform, occurs?

4655


What is the difference between Call and a Link?

1137


Explain how to differentiate call by context by comparing it to other calls?

1146


Explain what you understand by passing by value.

1107


What kind of error is trapped by on size error option?

1189


Write a program to enter and display the names of students in a class using the occurs clause.

1166


What is the difference between perform … with test after and perform … with test before?

1384


I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......

12218


What guidelines should be followed to write a structured cobol prgm?

1110


What is inspect in cobol ?

1257


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

1054


What is rmode(any) ?

1201


What are the different data types in cobol?

1355


What are various search techniques in cobol? Explain.

1033


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

2089