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...


I have two questions here.
1. How to read a flat file in reverse order?
2. How to read a VSAM KSDS file in reverse order?

In both the cases we donot know the total number of records.

Answers were Sorted based on User's Feedback



I have two questions here. 1. How to read a flat file in reverse order? 2. How to read a VSAM KSD..

Answer / kingmanish

For the KSDS file we can set the pointer on the last record.
After that use the command READ Previous to read the
records in the reverse order.

I am not very sure about flat file. May be we can use a
turn around.
Sort the file in descending order first and then start
reading.

Is This Answer Correct ?    7 Yes 6 No

I have two questions here. 1. How to read a flat file in reverse order? 2. How to read a VSAM KSD..

Answer / hanish

Flat file may be read in reverse order by using the following code

READ file-name into data-name REVERSED.

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More COBOL Interview Questions

How to define a array dynamically.....

5 Answers   Fidelity,


WE HAVE 2 FILES IN COBOL. ONE IS FIXED LENGTH RECORDS ANOTHER ONE IS VARIABLE LENGTH. IF I DECLEAR LRECL OF FIXED ONE AS 80 AND 2ND RECORD AS 132. WHAT WE NEED TO DECLEAR LRECL FOR THOSE 2 FILES IN JCL?

4 Answers   iGate,


01 a pic s9(5) value -12345, if we disply a , the sign will overpunched with last digit but i need to get the miuns sign in the result?

7 Answers  


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

0 Answers  


How to read records which is in sequential file in reverse order ? Exp. 1 2 3 4 5 . i want 5 4 3 2 1?please clear my doubt any one

10 Answers   IBM,


BY seeing a program how can we say that it is static call or dynamic call

5 Answers   CGI,


if you code move high-values to variable,can you move it into numeric variable or alphanumeric variable?

1 Answers   Patni,


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

0 Answers  


If a file has 1000 records.. if i have to replace the first and last characters of the file with another character. how it can be done....

1 Answers   HCL,


how can we code index in an array of cobol pgm?

1 Answers   Wipro,


If we use GO BACK instead of STOP RUN in cobol?

1 Answers   Temenos,


Have you code any new programs in COBOL ? What is the functionality of the programs?

2 Answers   Patni, Xansa,


Categories