# MU and PE

**URL:** <https://techcommunity.softwareag.com/t/mu-and-pe/198962>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes\
**Created:** [April 23, 2018, 3:30pm UTC](https://techcommunity.softwareag.com/t/mu-and-pe/198962 "2018-04-23T15:30:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Priyanka\_Chilka](https://avatars.discourse-cdn.com/v4/letter/p/ba8739/32.png) [@Priyanka\_Chilka](https://techcommunity.softwareag.com/u/Priyanka_Chilka)\
**Post date:** [April 23, 2018, 3:30pm UTC](https://techcommunity.softwareag.com/t/mu-and-pe/198962/1 "2018-04-23T15:30:38Z")

</div>

Can anybody kindly explain what is the difference between a MU field and PE group with examples?

---

<div class="post-metadata">

**Author:** ![Ralph\_Zbrog](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/ralph_zbrog/32/78_2.png) [@Ralph\_Zbrog](https://techcommunity.softwareag.com/u/Ralph_Zbrog)\
**Post date:** [April 23, 2018, 6:24pm UTC](https://techcommunity.softwareag.com/t/mu-and-pe/198962/2 "2018-04-23T18:24:58Z")

</div>

In Adabas an elementary field represents a single value per record, as you would expect. But Adabas also allows multi-valued fields (MU) which can represent 0 to 191 values per record (more, if the DBA allows it). Think of your salary as an example. You may be most concerned about your current salary value, but your management maintains a history of 0-n values.

```auto
EMP-ID Surname Salary
10000010 Smith 100000
                  75000
                 600000
10001200 Jones 80000 
10032101 Zamboni 100000
                  90000
                  85000
```

In my example Smith’s salary history doesn’t make much sense. What we need is a set of additional fields for each salary. This multiple-value set is called a Perdiodic Group (PE). Our PE contains SALARY, CURRENCY, and START-DATE.

```auto
EMP-ID Surname Salary Cur Start
10000010 Smith 100000 USD 2018.01.01
                  75000 EUR 2015.06.15
                 600000 HKD 2012.02.17
10001200 Jones 80000 EUR 2017.01.01
10032101 Zamboni 100000 USD 2018.07.15
                  90000 USD 2016.01.01
                  85000 USD 2015.12.01
```

An MU is identical to a vector in Working storage. A PE is identical to an array.

```auto
1 EMP VIEW EMPLOYEES
  2 INCOME
    3 SALARY (50)
    3 CURRENCY (50)
    3 START-DATE (50)
1 #HISTORY (50)
  2 #SALARY (P9.2)
  2 #CURRENCY (A3)
  2 #START (D)
```

A PE may contain one or more MUs.

---

<div class="post-metadata">

**Author:** ![Priyanka\_Chilka](https://avatars.discourse-cdn.com/v4/letter/p/ba8739/32.png) [@Priyanka\_Chilka](https://techcommunity.softwareag.com/u/Priyanka_Chilka)\
**Post date:** [April 24, 2018, 3:14pm UTC](https://techcommunity.softwareag.com/t/mu-and-pe/198962/3 "2018-04-24T15:14:08Z")

</div>

Thank you…the information was very much clear 🙂

---

<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, 3:40pm UTC](https://techcommunity.softwareag.com/t/mu-and-pe/198962/4 "2021-04-02T15:40:30Z")

</div>


