Adabas Read


I would like to know how to read adabas file using a start key and endkey?
as per my requirements I have to use startkey as Expiration date with values 000000 and endkey with values 9999999…this is a cobol-adabas program.

If my requirement not clear please explain any way to read the Adabas files with keys and kindly provide any sample code…

Thanks in advance

Hello subba,

with Adabas you have 2 ways to select records:

  1. search command (S1, S2, etc.) which allows to select a set of records that fulfill (multiple) selection criteria.
  2. read command (physical, by ISN or logical i.e. by descriptor)
    You seem to want to read the records in descriptor sequence from a start value to an end value.

This can be achieved with the L3 command. You can read in asending and descending sequence and give a from-to range of values in the search/value buffer. Please see the documentation for further details.

This link leads to some example code for Cobol:

I hope this helps,
Marbod Mueller