example direct call program using prefetch or Multifetch

Hi:

Do you have an example program in Cobol using Prefetch and Multifetch under CICS. I have Ada 7.4.4

regards :wink:

cobol was one of the old programming language.

i don’t think you can find what you are talking about.

You can if you are doing direct calls to Adabas. Just specify the M or O option for multifetch for the Lx/ET/BT commands. Prefetch is also an option as well.

Please consult the Adabas Command Reference manual under General Programming Considerations for how to use the multifetch functionality.

just a few thoughts you might find interesting:

If you are starting using this you should use multifetch, prefetch will not be supported for ever.

Be carefull with the ET/BT logic (ask yourself if you read records in hold in advance, if you want to update them after the ET/BT - you can specify them to keep in hold - or if release them and ´throw´ them away)

And then also be carefull when you update the descriptor(s) you are using for the read. The records which you have read in advance will be stored in ´your´ memory and adabas will not update them. What you can always do is throw the data which you have read in advance away and start again, but then at the end the question is if you do that often then you will not gain much.

We have even seen situations where our ADAMLF was less effective than without because reading ahead costs more than a normal read and then if the data is not used there are costs for nothing.
I hope you understand what I mean :slight_smile:

By the way our ADAMLF does start ´slowly´ with the read ahead, from one call to the next we increase the number of records which are read in advance.

And our Natural does use ASBX calls to have larger buffer sizes.

And maybe you should think about parameterization for the number of records to be read in advance.