Adabas Read

Hi

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
Subba

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.

[url]http://techcommunity.softwareag.com/ecosystem/documentation/adabas/ada813mfr/adamf/comref/l3l6.htm#l3l6[/url]

This link leads to some example code for Cobol:
[url]http://techcommunity.softwareag.com/ecosystem/documentation/adabas/ada813mfr/adamf/comref/acb_ex.htm#acb_cob[/url]

I hope this helps,
Marbod Mueller