Read vsam file in reverse order?

Other Mainframe related questions which attracts you and there is no suitable Forum you find for it and related FAQs.
Post Reply
Bobbie V
New Member
Posts: 8
Joined: Wed Feb 17, 2016 9:36 am

Read vsam file in reverse order?

Post by Bobbie V »

Hi,

How do we read vsam file in reverse order? Is this possible, if yes please help.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Read vsam file in reverse order?

Post by Robert Sample »

Generally, VSAM data sets (like sequential data sets) will be read sequentially from the first record to the last.  You can use direct reads instead of sequential reads to skip around in the data set.  

CICS does allow you to read in a reverse fashion by allowing EXEC CICS READPREV but this only applies to CICS.
Bobbie V
New Member
Posts: 8
Joined: Wed Feb 17, 2016 9:36 am

Re: Read vsam file in reverse order?

Post by Bobbie V »

Robert Sample" wrote: Thu Feb 15, 2024 1:55 am Generally, VSAM data sets (like sequential data sets) will be read sequentially from the first record to the last.  You can use direct reads instead of sequential reads to skip around in the data set.  

CICS does allow you to read in a reverse fashion by allowing EXEC CICS READPREV but this only applies to CICS.
 
This does not apply to normal COBOL Batch program, then how can we do this for batch? please guide.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “Other Mainframe Topics, Off-Topics, FAQs.”