How to read records from flat file in reverse order through
COBOL program?

Answers were Sorted based on User's Feedback



How to read records from flat file in reverse order through COBOL program?..

Answer / sreejith

i think it is also possible by using access mode dynamic.
first randomly point last record from the file using START
option. after you start read record in reverse order by
using READ PREV option until header of the file reached

Is This Answer Correct ?    18 Yes 26 No

How to read records from flat file in reverse order through COBOL program?..

Answer / gurukulu

use COBOL internal sort in ascending or descending key.

Is This Answer Correct ?    0 Yes 11 No

How to read records from flat file in reverse order through COBOL program?..

Answer / janu

using iebcmpr
we can easily read
sort fields=(pos,length,d,char)

Is This Answer Correct ?    8 Yes 23 No

How to read records from flat file in reverse order through COBOL program?..

Answer / chp

can we use read prev in cobol programming???

Is This Answer Correct ?    8 Yes 23 No

Post New Answer

More COBOL Interview Questions

How to replace the GOTO statement in COBOL without changing the structure of program. e.g. consider following code... I.D. E.D. D.D. P.D. compute C = A + B. GOTO para 100-display. compute D = C - D. GOTO 200-display. some other logic...... ........ GOTO 300-para. ...... ...... GOTO 400-para. Now I want to replacce all GOTO statements without changing the structure and otput of program.

6 Answers   Accenture,


HOW WE WILL SORT THE ARRAY WHICH IS GOING TO USE FOR SEARCH ALL?

2 Answers   Cap Gemini,


In COBOL "BEFORE" advancing is there or not ?

3 Answers  


Hi All, Can anyone tell me how we can MOVE value of a X(19) variable to a S9(17) COMP-3 variable? Answer with an Example will be of great help.

6 Answers   EDS,


Please let me know at which Scenarios we will go for STATIC call or DYNAMIC

3 Answers   IBM,






What is the use of EVALUATE statement?

4 Answers   Tesco,


what is the default print format? in cobol

3 Answers   HSBC,


what is qualification on occurs clause?

2 Answers  


why we are using set in searchall?

4 Answers   IBM,


Hi , I am posting some questons which are asked at interview. These may help u for ur interview... what is static and dynamic call?

2 Answers   TCS,


I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.

0 Answers   Steria,


can u give result for the fallowing example... 05 a pic 9(2) 05 b redifines a pic x(2). move 'xy' to b. display a,b.

10 Answers   IBM,


Categories