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.

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue

1931


How to remove the spaces at the end of each record in the output file of variable length, via cobol program?

676


What are the pertinent COBOL

2045


What are declaratives and what are their uses in cobol?

714


In COBOL programming, what is PERFORM? What is VARYING?

672






Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.

5065


What is the difference between comp and comp-3?

704


System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..

1588


How to use the same COBOL program in Batch and CICS on lines? explain with an example

1914


How are the next sentence and continue different from each other?

766


Differentiate between structured cobol programming and object-oriented cobol programming.

667


What is the utilization of copybook in cobol? Could we utilize a similar copybook?

720


Write a program to explain size error.

677


Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?

631


How do you reference the following file formats from cobol programs?

695