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 / muttaiah

Narayan if we use your sort card we will get records in
reverse order but along with sequence numbers in cols 81-
84. You are not trimming the seq numbers

Stp1:
SORT FIELSD=COPY
OUTREC=(1,80,SEQNUM,4,ZD)

stp2:
SORT FIELSD=(81,4,ZD,D)
Outrec=(1,80)

The output file will have the records in reverse order.

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why did you choose to work with ibm mainframe cobol programming?

1115


Why would you use find and get rather than to obtain?

1188


Why is it necessary that file needs to be opened in I-O mode for REWRITE?

1330


how do you reference the printer file formats from cobol programs

1224


Can we change the password using ALTER? anyone tried and changed?

2021


Discuss about changing dataset name in proc.

1239


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

1080


How do you get the data to code the BMS macro?

1976


How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?

1205


What is a scope terminator give example?

1116


What is inspect in cobol ?

1307


How can you get the ksds file records into your cobol program?

1100


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

1224


What is the local-storage section?

1149


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

2476