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

Answer Posted / pa

Being a flat file, we cant be sure that it will have a unique key field. So, External to the cobol program , using SORT utility, we can add a serial no column, and then SORT it in descending order based on that column and read the file sequentially in COBOL program.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the default value(s) for an initialize? What keyword will allow for an override of the default?

906


What are various search techniques in cobol? Explain.

902


Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks

2653


What is a SSRANGE and NOSSRANGE?

1170


1.Is it possible to move the data from 99.99 to 99v99? 2.What is the CICS-vsam Compilation process? 3.In My GDG 5 generation will be there GDG3 got an abend what will happen? 4.In my GDG first generation is +1 And I want to add the new generation what will happen previous generation? 5.How can you give the PIC clause below conditions A). s9 (reddy), B). s9 (5) occurs 5 times? 6.How override the proc from a particular step? and what is symbolic and override Procs?

5637


Can you please let me know the centre name of INS certification in Kolkata.

1989


what is the use of outrecord?

2004


What are the access modes of START statement?

970


How do define dynamic array in cobol.

904


What is Pic 9v99 Indicates in COBOL?

975


What type of SDLC u followed? Why?

1756


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

1012


What is the utilization of copybook in cobol?

913


what is amode(24), amode(31), rmode(24) and rmode(any)?

926


If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly

2913