# ADABAS Multifetch

**URL:** <https://techcommunity.softwareag.com/t/adabas-multifetch/76454>\
**Category:** Forum\
**Tags:** Adabas-Natural, Adabas, Adabas-on-Mainframes, Adabas-Basics-on-Mainframes\
**Created:** [March 28, 2008, 5:51pm UTC](https://techcommunity.softwareag.com/t/adabas-multifetch/76454 "2008-03-28T17:51:02Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![cobp3](https://avatars.discourse-cdn.com/v4/letter/c/e36b37/32.png) [@cobp3](https://techcommunity.softwareag.com/u/cobp3)\
**Post date:** [March 28, 2008, 5:51pm UTC](https://techcommunity.softwareag.com/t/adabas-multifetch/76454/1 "2008-03-28T17:51:02Z")

</div>

I want to implement a multifetch access in a existing program that uses sequential(physical) read of Adabas records.  
I think, Following parameters would be additionally required/set to make the existing ADABAS call

ISN lower limit (ACBISL) - 0 (To get as many records or 3)  
Command Option 1 (ACBCOP1) ‘M’  
Record buffer length (ACBRBL) reclength \* 3  
ISN buffer length (ACBIBL) 52(for 3 records, 16\*3+4)

I have specified record buffer that has enough space to accomodate 3 records. record buffer length is set as 3 times length of record(9054\*3).

But still I get a single record as a result of ADABAS CALL: Nr. of records in ISN buffer is 1, and returncode of ISN buffer records are 0. What would have been wrong in the implementation? I have checked the documentation , I couldnt find any examples other than the description of parmeters as described above.

---

<div class="post-metadata">

**Author:** ![Marbod\_Mueller1](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/marbod_mueller1/32/97_2.png) [@Marbod\_Mueller1](https://techcommunity.softwareag.com/u/Marbod_Mueller1)\
**Post date:** [March 31, 2008, 1:57pm UTC](https://techcommunity.softwareag.com/t/adabas-multifetch/76454/2 "2008-03-31T13:57:52Z")

</div>

Hello cobp3,

how you’re setting the call parameters looks correct.

Below is a snapshot from the employees file with the expected 3 records - see below.

If you get back only one record do you also get the related multifetch record descriptor in the ISN Buffer?

Is the record size in the element the same as your calculated record size?  
Do you have variable fields or occurrences specified?

In some scenarios intermediate components may limit the use of multifetch (e.g. user exits). Do you have any of those?

What is your environment? I.e. batch/tp Adabas version.

HTH,  
Marbod Mueller

```auto

   CID DBI FNR RSP ISN ISL ISQ FBL RBL SBL VBL IBL OP1 OP2
L2 EMPL 8 11 0 1 0 0 32 2000 128 128 52 M

FB AA,AE.
RB 50005500BRAUN 50004900CAOUDAL 50004600VERDIE

CB 0000 C100D3F2 C5D4D7D3 000B0000 00000001 *A L2EMPL *
CB 0010 00000000 00000000 002007D0 00800080 * *
CB 0020 0034D440 40404040 40404040 00FC0054 * M *
CB 0030 40404040 40404040 40404040 40810008 * a *
CB 0040 40404040 00000000 00000003 40404040 * *

FB 0000 C1C16BC1 C54B4040 40404040 40404040 *AA,AE. *
FB 0010 40404040 40404040 40404040 40404040 * *

RB 0000 F5F0F0F0 F5F5F0F0 C2D9C1E4 D5404040 *50005500BRAUN *
RB 0010 40404040 40404040 40404040 F5F0F0F0 * 5000*
RB 0020 F4F9F0F0 C3C1D6E4 C4C1D340 40404040 *4900CAOUDAL *
RB 0030 40404040 40404040 F5F0F0F0 F4F6F0F0 * 50004600*
RB 0040 E5C5D9C4 C9C54040 40404040 40404040 *VERDIE *
RB 0050 40404040 40404040 40404040 40404040 * *

IB 0000 00000003 0000001C 00000000 00000001 * *
IB 0010 00000000 0000001C 00000000 00000002 * *
IB 0020 00000000 0000001C 00000000 00000003 * *
IB 0030 00000000 * *
```

---

<div class="post-metadata">

**Author:** ![cobp3](https://avatars.discourse-cdn.com/v4/letter/c/e36b37/32.png) [@cobp3](https://techcommunity.softwareag.com/u/cobp3)\
**Post date:** [March 31, 2008, 3:20pm UTC](https://techcommunity.softwareag.com/t/adabas-multifetch/76454/3 "2008-03-31T15:20:57Z")

</div>

Hello Marbod  
Thanks for the reply.  
Multifetch descriptor of first record seems to be corect.It’s length is  
9524, which is the length of a single record. Record buffer length was 28572.

There wasn’t any user exits.Test environment is batch.

> [@](#):
>
> Is the record size in the element the same as your calculated record size?  
> Do you have variable fields or occurrences specified?

Record structure is fixed length(There is no OCCURS …VARYING clause).

---

<div class="post-metadata">

**Author:** ![Marbod\_Mueller1](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/marbod_mueller1/32/97_2.png) [@Marbod\_Mueller1](https://techcommunity.softwareag.com/u/Marbod_Mueller1)\
**Post date:** [March 31, 2008, 6:06pm UTC](https://techcommunity.softwareag.com/t/adabas-multifetch/76454/4 "2008-03-31T18:06:21Z")

</div>

Hello cobp3,

this is strange.

The only cases where the nucleus does not fill the buffer is when a response code is given or when the next record is held by some other user.

Are you using L2 or L5?

Which version of Adabas and OS are you using? Any accelerators like Fastpath?

Kind regards,  
Marbod Mueller

---

<div class="post-metadata">

**Author:** ![cobp3](https://avatars.discourse-cdn.com/v4/letter/c/e36b37/32.png) [@cobp3](https://techcommunity.softwareag.com/u/cobp3)\
**Post date:** [April 1, 2008, 6:55pm UTC](https://techcommunity.softwareag.com/t/adabas-multifetch/76454/5 "2008-04-01T18:55:04Z")

</div>

Hello Marbod,  
L2 command is being used in this case.

OS version is BS2000 / OSD Vers. 5.0  
Adarep output shows “A D A R E P V7.4.”

But anyway, I need to improve the performance of a sequential Physical  
read. What about using ADARUN and externally specifying prefetch  
buffers. Would it improve the performance?

---

<div class="post-metadata">

**Author:** ![Marbod\_Mueller1](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/marbod_mueller1/32/97_2.png) [@Marbod\_Mueller1](https://techcommunity.softwareag.com/u/Marbod_Mueller1)\
**Post date:** [April 2, 2008, 8:51pm UTC](https://techcommunity.softwareag.com/t/adabas-multifetch/76454/6 "2008-04-02T20:51:30Z")

</div>

Hello cobp3,

that looks like a problem then. Do you get more records with a smaller logical record size (ie. less fields in the format)?

With batch programs you certainly should try the ADARUN PREFETCH=YES features. There you can parameterize multifetch operation without changing your application program.

Since ADARUN multifetch uses the same M option as your application I am curious if it returns multiple records. If it doesn’t you should gather diagnostic information (i.e. nucleus DDPRINT, command log with layout 5 with FB and RB and an ADAREP with the used file’s FDT) and contact Adabas support…

Kind regards,  
Marbod

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:49pm UTC](https://techcommunity.softwareag.com/t/adabas-multifetch/76454/7 "2021-04-02T14:49:17Z")

</div>


