Need some confirmation on Basic READ and FIND.

Below are my understanding from READ and FIND commands in NATURAL. Please go through once and give your thoughts.

  1. READ Physical - We use when we need to access huge data or entire data from the Adabas file. It reads directly from the Adabas blocks.

  2. READ By ISN - We use when we need to access huge data or entire data from the Adabas file in order of ISN. Practically we can use it to read the records in the sequence it was stored. On first come first serve basis. It reads Adabas thru Address converter.
    (Now if total number of ISNs get exhausted, will it use existing unused ISN numbers? If yes then the records will not be in FIFO basis)

  3. READ Logical - We use when we need to access huge data or entire data from the Adabase file in order of any descriptor. It reads Adabas thru Inverted List.

  4. FIND - We use when we need to access the records based any any specific criteria. We can use *NUMBER here to know the exact number of records fulfilling that criteria. It also access Adabas thru Inverted List.

All of the questions you have raised in the last couple of days are covered in a good Natural basic class. You should get the company you are working for to sponsor such a class; DEMAND, not ask.

With regard to your itemized list.

  1. is okay.

  2. Only if you have non reusable ISNs (then isn sequence is chronological sequence of ADDs) or if you have user assigned ISNs (and hence the ISN is “meaningful”.

  3. Maybe not, especially if you require an entire file, and the file is not in that physical sequence. Then you might use Adabas utility to resequence the file; or, read the file in physical sequence and use ACCEPT/REJECT (or ESCAPE TOP) logic to select records and then use SORT.

  4. But if the criteria is a range (e.g. Names which start with M) you might be better advised to READ LOGICAL since FIND will return records in ISN sequence, not Name sequence.

Thanks Steve!