How to read a sequential file in reverse order

Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS
nikhilgalgate
Posts: 9
Joined: Tue Dec 25, 2007 1:12 pm
Skillset: COBOL,DB2,JCL,VSAM,CICS
Referer: From www.google.com

How to read a sequential file in reverse order

Postby nikhilgalgate » Wed Jan 23, 2008 2:06 pm

Hi,

Can any one post that is the cobol having the facility to read a sequential file(Other than on tape) in reverse order?. If not , is it possible??
:?

Thanks,

arunprasad.k
Posts: 110
Joined: Thu Dec 27, 2007 5:18 pm
Skillset: Known little stuffs to answer a few queries!!
Referer: Google
Contact:

Re: How to read a sequential file in reverse order

Postby arunprasad.k » Wed Jan 23, 2008 3:08 pm

nikhilgalgate,

You can NOT read a sequential file in reverse order using COBOL read statement.

But that functionality is there in FileAid.

Use the following statement in SYSIN to copy that file in reverse order and then use the file in sequential mode in COBOl.

Code: Select all

$$DD01 COPYBACK


Arun.


  • Similar Topics
    Replies
    Views
    Last post