# Defining Arrays with Variables

**URL:** <https://techcommunity.softwareag.com/t/defining-arrays-with-variables/78722>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes\
**Created:** [August 8, 2008, 3:32am UTC](https://techcommunity.softwareag.com/t/defining-arrays-with-variables/78722 "2008-08-08T03:32:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michele1](https://avatars.discourse-cdn.com/v4/letter/m/e56c9b/32.png) [@Michele1](https://techcommunity.softwareag.com/u/Michele1)\
**Post date:** [August 8, 2008, 3:32am UTC](https://techcommunity.softwareag.com/t/defining-arrays-with-variables/78722/1 "2008-08-08T03:32:43Z")

</div>

I am having trouble defining an array , at level 1 with a variable.

I have predefined the variable as such  
1 #arry-size (n3) init \<100\>

then further down I have about 10 variables I want to make single dimension arrays out of…

such as  
1 #etp-id (n4/#arry-size)

I even tried  
1 #etp-id (n4/1:#arry-size)

NAT0280 Index entry incorrectly specified for field.

I would appreciate any help. Thank you!

In both cases I get the following error

---

<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:** [August 8, 2008, 4:01am UTC](https://techcommunity.softwareag.com/t/defining-arrays-with-variables/78722/2 "2008-08-08T04:01:08Z")

</div>

Change that INIT to CONST.

---

<div class="post-metadata">

**Author:** ![Michele1](https://avatars.discourse-cdn.com/v4/letter/m/e56c9b/32.png) [@Michele1](https://techcommunity.softwareag.com/u/Michele1)\
**Post date:** [August 8, 2008, 4:46am UTC](https://techcommunity.softwareag.com/t/defining-arrays-with-variables/78722/3 "2008-08-08T04:46:49Z")

</div>

OOOOPS ! THANK YOU!.. :oops:

---

<div class="post-metadata">

**Author:** ![Michele1](https://avatars.discourse-cdn.com/v4/letter/m/e56c9b/32.png) [@Michele1](https://techcommunity.softwareag.com/u/Michele1)\
**Post date:** [August 8, 2008, 4:47am UTC](https://techcommunity.softwareag.com/t/defining-arrays-with-variables/78722/4 "2008-08-08T04:47:18Z")

</div>

OOOOPS ! THANK YOU!.. :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:50pm UTC](https://techcommunity.softwareag.com/t/defining-arrays-with-variables/78722/5 "2021-04-02T14:50:43Z")

</div>


