# Why can’t I define a variable as (I8)?

**URL:** <https://techcommunity.softwareag.com/t/why-can-t-i-define-a-variable-as-i8/171663>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes\
**Created:** [July 1, 2013, 5:41pm UTC](https://techcommunity.softwareag.com/t/why-can-t-i-define-a-variable-as-i8/171663 "2013-07-01T17:41:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Curtis\_Pew](https://avatars.discourse-cdn.com/v4/letter/c/5f9b8f/32.png) [@Curtis\_Pew](https://techcommunity.softwareag.com/u/Curtis_Pew)\
**Post date:** [July 1, 2013, 5:41pm UTC](https://techcommunity.softwareag.com/t/why-can-t-i-define-a-variable-as-i8/171663/1 "2013-07-01T17:41:36Z")

</div>

Haven’t we all been using 64-bit machines for years now?

---

<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:** [July 1, 2013, 7:29pm UTC](https://techcommunity.softwareag.com/t/why-can-t-i-define-a-variable-as-i8/171663/2 "2013-07-01T19:29:51Z")

</div>

I guess that’s one of the questions, how many boxes out there still don’t know about AG, AGR & co ?

Did you really every miss it (I haven’t, so far, to be honest).

Why not add an ER for this ?

---

<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:** [July 1, 2013, 7:32pm UTC](https://techcommunity.softwareag.com/t/why-can-t-i-define-a-variable-as-i8/171663/3 "2013-07-01T19:32:15Z")

</div>

Oh yes, and it’s more a “Natural general” type questions, most platforms are 64-bit nowadays 😉

---

<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:** [July 2, 2013, 2:24am UTC](https://techcommunity.softwareag.com/t/why-can-t-i-define-a-variable-as-i8/171663/4 "2013-07-02T02:24:23Z")

</div>

And while we’re at it, allow for unsigned (Ix) fields - perhaps (UIx) or (Jx).

---

<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:** [July 2, 2013, 2:47pm UTC](https://techcommunity.softwareag.com/t/why-can-t-i-define-a-variable-as-i8/171663/5 "2013-07-02T14:47:51Z")

</div>

> [@Kevin Thane](#):
>
> And while we’re at it, allow for unsigned (Ix) fields - perhaps (UIx) or (Jx).

B-type Fields can be used as some kind of unsigned integer fields. But arithmetic statements are not allowed - sometimes.

But for example this works:

define data local  
01 #i4 (I4)  
01 #b4 (B4)  
end-define  
#i4 := 255  
#b4 := #i4  
display #i4 #b4  
add 1 to #i4  
if #i4 \> #b4  
write ‘greater’  
end-if  
end

---

<div class="post-metadata">

**Author:** ![Curtis\_Pew](https://avatars.discourse-cdn.com/v4/letter/c/5f9b8f/32.png) [@Curtis\_Pew](https://techcommunity.softwareag.com/u/Curtis_Pew)\
**Post date:** [July 4, 2013, 10:56pm UTC](https://techcommunity.softwareag.com/t/why-can-t-i-define-a-variable-as-i8/171663/6 "2013-07-04T22:56:15Z")

</div>

> [@Wolfgang Winter](#):
>
> I guess that’s one of the questions, how many boxes out there still don’t know about AG, AGR & co ?

I can’t imagine there are very many.

> [@Wolfgang Winter](#):
>
> Did you really every miss it (I haven’t, so far, to be honest).

That’s what prompted my original post; the program I was working on would have been more elegant if I’d had (I8) fields to work with. But I did work around it.

> [@Wolfgang Winter](#):
>
> Why not add an ER for this ?

I’ll think about it.

---

<div class="post-metadata">

**Author:** ![Curtis\_Pew](https://avatars.discourse-cdn.com/v4/letter/c/5f9b8f/32.png) [@Curtis\_Pew](https://techcommunity.softwareag.com/u/Curtis_Pew)\
**Post date:** [July 4, 2013, 11:08pm UTC](https://techcommunity.softwareag.com/t/why-can-t-i-define-a-variable-as-i8/171663/7 "2013-07-04T23:08:26Z")

</div>

> [@Curtis Pew](#):
>
> That’s what prompted my original post; the program I was working on would have been more elegant if I’d had (I8) fields to work with. But I did work around it.

I should probably admit that it was an odd program to be writing in Natural. It would have been even more elegant if Natural provided access to bit-level operations like shifts and bitwise and, or, and xor. As it was, I had to call assembler routines for significant parts of the operation.

---

<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:29pm UTC](https://techcommunity.softwareag.com/t/why-can-t-i-define-a-variable-as-i8/171663/8 "2021-04-02T15:29:03Z")

</div>


