# Periodgroup field in Format buffer

**URL:** <https://techcommunity.softwareag.com/t/periodgroup-field-in-format-buffer/76657>\
**Category:** Forum\
**Tags:** Adabas-Natural, Adabas, Adabas-on-Mainframes, Adabas-Basics-on-Mainframes\
**Created:** [May 5, 2008, 12:53pm UTC](https://techcommunity.softwareag.com/t/periodgroup-field-in-format-buffer/76657 "2008-05-05T12:53:12Z")\
**Posts on this page:** 6\
**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:** [May 5, 2008, 12:53pm UTC](https://techcommunity.softwareag.com/t/periodgroup-field-in-format-buffer/76657/1 "2008-05-05T12:53:12Z")

</div>

As per the documentation of format buffer, a periodic group field can be specfied as follows.

> [@](#):
>
> If a periodic group (or a field within a periodic group) is to be  
> referenced, the specific occurrence to be used must be specified.  
> This is accomplished by appending a one- to three-digit index  
> (value 1-191, leading zeros are permitted) to the name.

Would it be possible to specifiy the fieldname alone, What would happen in that case? Is it “Periodic Group Occurrence (ACBISN)” relevant for that case?

> [@](#):
>
> ISN: Periodic Group Occurrence (ACBISN)  
> If the descriptor for which values are to be returned is contained within a periodic group, Adabas returns in this field the occurrence number in which the value being returned is located. The occurrence number is provided in binary format in the two low-order bytes.

---

<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:** [May 5, 2008, 5:17pm UTC](https://techcommunity.softwareag.com/t/periodgroup-field-in-format-buffer/76657/2 "2008-05-05T17:17:02Z")

</div>

Hello cobp3,  
this is a good question.

In general the occurrence needs to be specified with the format element for the field otherwise Adabas returns response 41.

However, with the L9 it is possible to omit the occurrence number because it is ignored in the format element.

The L9 takes the returned value from the index and not from the compressed record. In the index, the occurrence is appended to the value and on the ascending L9 same values are returned with ascending occurrence number in the ACBISN field.

In order to only select values from one occurrence specify the occurrence number in the search buffer.

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:** [May 7, 2008, 12:12pm UTC](https://techcommunity.softwareag.com/t/periodgroup-field-in-format-buffer/76657/3 "2008-05-07T12:12:48Z")

</div>

Hallo Marbod,  
Thanks for the reply. That means if occurence nr. is not specified in searchbuffer, the result would be all possible combinations of (value, occurencenr) on repeated invocation.

e.g if field has 3 occurences and field has values (“A” in 2 and 3 occurence, “B” 1 and 2 occurence) then on repeated invocation the result would be

“A” -  
2 (occurence nr in 1 invocation)  
3 (occurence nr in 2 invocation)  
“B” - 1 (occurence nr in 3 invocation)  
2((occurence nr in 4 invocation)

right?

btw, For adabas response code 41, how the subcode can be found?

When additions-2 is redefined as PIC 9(5) BINARY (which is exactly 4bytes) value is 689766400. when the last two bytes are redefined as BINARY the result is Zero.  
How this an be determined?

---

<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:** [May 7, 2008, 2:04pm UTC](https://techcommunity.softwareag.com/t/periodgroup-field-in-format-buffer/76657/4 "2008-05-07T14:04:48Z")

</div>

> [@cobp3](#):
>
> btw, For adabas response code 41, how the subcode can be found?
> 
> When additions-2 is redefined as PIC 9(5) BINARY (which is exactly 4bytes) value is 689766400. when the last two bytes are redefined as BINARY the result is Zero.  
> How this an be determined?

Nope, S9(5) BINARY is a halfword (2 bytes), S9(9) would be a fullword(4 bytes).

But that doesn’t help you here, because Rsp 41 doesn’t have a subcode, but:

```auto
If available, then the short name of the field for which the error occurred is stored in the leftmost two bytes of the Additions 2 field
```

---

<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:** [May 7, 2008, 2:40pm UTC](https://techcommunity.softwareag.com/t/periodgroup-field-in-format-buffer/76657/5 "2008-05-07T14:40:10Z")

</div>

> [@](#):
>
> nope, S9(5) BINARY is a halfword (2 bytes), S9(9) would be a fullword(4 bytes).

compiler COBOL85 V02.3A12 on Bs2000, listing shows 4 bytes for the definition, 9(5) BINARY.

> [@](#):
>
> But that doesn’t help you here, because Rsp 41 doesn’t have a subcode, but:

ok, thanks.

---

<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/periodgroup-field-in-format-buffer/76657/6 "2021-04-02T14:49:25Z")

</div>


