# Subfield question

**URL:** <https://techcommunity.softwareag.com/t/subfield-question/90399>\
**Category:** Forum\
**Tags:** Adabas-Natural, Adabas, Adabas-Scope-of-Product\
**Created:** [June 10, 2009, 8:17pm UTC](https://techcommunity.softwareag.com/t/subfield-question/90399 "2009-06-10T20:17:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Osman\_Sanchez](https://avatars.discourse-cdn.com/v4/letter/o/ac8455/32.png) [@Osman\_Sanchez](https://techcommunity.softwareag.com/u/Osman_Sanchez)\
**Post date:** [June 10, 2009, 8:17pm UTC](https://techcommunity.softwareag.com/t/subfield-question/90399/1 "2009-06-10T20:17:14Z")

</div>

Hello,  
Can I define a subfield from a MU-field or fileds of PE?

Thanks in advanced

---

<div class="post-metadata">

**Author:** ![Matthias1](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@Matthias1](https://techcommunity.softwareag.com/u/Matthias1)\
**Post date:** [June 12, 2009, 4:20pm UTC](https://techcommunity.softwareag.com/t/subfield-question/90399/2 "2009-06-12T16:20:27Z")

</div>

Did you mean subdescriptor?

Of course you can define a subdescriptor for a part of an PE/MU-Field.  
The following example creates a sudescriptor XX for the first 2 bytes of AK (which is part of a PE):

```auto
adainv db=12 invert=11 fields 'XX=AK(1,2)' end_of_fields
```

regarding DDM for Natural:

```auto
DB: 012 FILE: 011 - FILE11 DEFAULT SEQUENCE:
TYPE: ADABAS                                                           
                                                                       
T L DB Name F Leng S D Remark            
- - -- -------------------------------- - ---- - - ------------------
P 1 AJ GRP-AJ
  2 AK PE-AK A 8 N
  2 AL PE-AL N 7.0 N
  2 AM PE-AM N 7.0 N
P 1 XX SUBDES-XX A 2 S
* -------- SOURCE FIELD(S) -------
* PE-AK(1-2)
```

Of cource you can make a natural-redefinition of an PE-field as well. This could be your natural-program:

```auto
define data local
01 viewname view of file11
02 grp-aj (1:2)
  03 pe-ak
  03 redefine pe-ak
    04 ak-first3 (A3)
end-define
find viewname with subdes-xx = 'AB'
display *ISN viewname ak-first3(*)
end-find
end
```

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [June 15, 2009, 9:18am UTC](https://techcommunity.softwareag.com/t/subfield-question/90399/3 "2009-06-15T09:18:30Z")

</div>

Osman: yes, you can on the mainframe:  
[http://techcommunity.softwareag.com/ecosystem/documentation/adabas/ada814mfr/adamf/util/flddefs.htm#fndef\_subfn](http://techcommunity.softwareag.com/ecosystem/documentation/adabas/ada814mfr/adamf/util/flddefs.htm#fndef_subfn)

> [@](#):
>
> The parent field for a subfield can be:  
> a multiple-value field  
> within a periodic group  
> The parent field for a subfield cannot:  
> have format “G” (floating point)  
> be a long alphanumeric (LA) field

---

<div class="post-metadata">

**Author:** ![Matthias1](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@Matthias1](https://techcommunity.softwareag.com/u/Matthias1)\
**Post date:** [June 15, 2009, 6:04pm UTC](https://techcommunity.softwareag.com/t/subfield-question/90399/4 "2009-06-15T18:04:21Z")

</div>

OK, it seems to be a mainframe-Feature.  
Sorry, I’m only familiar with ADABAS on Open Systems … :oops:

---

<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:57pm UTC](https://techcommunity.softwareag.com/t/subfield-question/90399/5 "2021-04-02T14:57:08Z")

</div>


