# Next strange Error on Nat 6.1.1

**URL:** <https://techcommunity.softwareag.com/t/next-strange-error-on-nat-6-1-1/93282>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Linux\
**Created:** [April 8, 2010, 4:10pm UTC](https://techcommunity.softwareag.com/t/next-strange-error-on-nat-6-1-1/93282 "2010-04-08T16:10:20Z")\
**Posts on this page:** 9\
**Page:** 1

<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:** [April 8, 2010, 4:10pm UTC](https://techcommunity.softwareag.com/t/next-strange-error-on-nat-6-1-1/93282/1 "2010-04-08T16:10:20Z")

</div>

Hello all!

One of my programs goes into a strange error on NAT 6.1.1  
I reduced the code to the following:

```auto
define data local
1 testview view SAG-TOURS-G-PERSON
  2 nachname /* (A20)
  2 vorname-1 /* (A20)
  2 titel /* (A20)
  2 anrede /* (A8)
1 #a50 (A50) init <'INIT'>
1 #i2 (I2)
1 #array(1:1)
  2 #a15 (A15)
  2 #a4 (A4)
  2 #N5 (N5)
end-define
*
#i2 := 1
write 'before compress' #i2 #a50
compress numeric #array(#i2) testview into #a50
  with all delimiters ";"
write 'after compress' #i2 #a50
#array.#a4(#i2) := "X" /* NAT1316
*
end
```

Output on Solaris:

```auto
before compress 1 INIT
after compress 15153 INIT
```

Output on Natural for Windows:

```auto
before compress 1 INIT
after compress 12603 INIT
```

Error 1: The compress fails  
Error 2: #i2 was changed

:shock:

Regards

Matthias

---

<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:** [April 8, 2010, 5:10pm UTC](https://techcommunity.softwareag.com/t/next-strange-error-on-nat-6-1-1/93282/2 "2010-04-08T17:10:52Z")

</div>

Maybe you got the English sample-views in your Natural-Installation…

```auto
define data local 
1 testview view SAG-TOURS-E-PERSON 
  2 surname /* (A20) 
  2 first-name-1 /* (A20) 
  2 title /* (A20) 
  2 form-of-address /* (A8) 
1 #a50 (A50) init <'INIT'> 
1 #i2 (I2) 
1 #array(1:1) 
  2 #a15 (A15) 
  2 #a4 (A4) 
  2 #N5 (N5) 
end-define 
* 
#i2 := 1 
write 'before compress' #i2 #a50 
compress numeric #array(#i2) testview into #a50 
  with all delimiters ";" 
write 'after compress' #i2 #a50 
#array.#a4(#i2) := "X" /* NAT1316 
* 
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:** [April 8, 2010, 7:52pm UTC](https://techcommunity.softwareag.com/t/next-strange-error-on-nat-6-1-1/93282/3 "2010-04-08T19:52:13Z")

</div>

Looks like you need to upgrade! Works in v6.3.2:

```auto

before compress 1 INIT
after compress 1 ;;0;;;;
```

---

<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:** [April 8, 2010, 8:21pm UTC](https://techcommunity.softwareag.com/t/next-strange-error-on-nat-6-1-1/93282/4 "2010-04-08T20:21:47Z")

</div>

Thank you!

Yes, we really need to upgrade. It’s no surprise to me that I get that answer from Software AG. 😉

BTW: It look’s like the compress statement writes something into #i2.

```auto
define data local 
1 testview view SAG-TOURS-E-PERSON 
  2 surname /* (A20) 
  2 first-name-1 /* (A20) 
  2 title /* (A20) 
  2 form-of-address /* (A8)
1 #a50 (A50) init <'INIT'> 
1 #i2 (I2) 
1 redefine #i2 
  2 #a2 (A2)
1 #array(1:1)
  2 #a15 (A15) 
  2 #a4 (A4) 
  2 #N5 (N5) 
end-define 
* 
#i2 := 1 
compress numeric #array(#i2) testview into #a50
  with all delimiters 'X'
write '=' #i2 '=' #a2
#i2 := 1
compress numeric #array(#i2) testview into #a50
  with all delimiters ';'
write '=' #i2 '=' #a2
* 
end
```

output:

```auto
#I2: 12632 #A2: X1
#I2: 12603 #A2: ;1
```

---

<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:** [April 10, 2010, 12:30am UTC](https://techcommunity.softwareag.com/t/next-strange-error-on-nat-6-1-1/93282/5 "2010-04-10T00:30:28Z")

</div>

Now at home on my PC with Natural 6.2.3@Win2k (community edition)

```auto
before compress 1 INIT 
after compress 12603 INIT
```

---

<div class="post-metadata">

**Author:** ![Steve\_Robinson](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/steve_robinson/32/107_2.png) [@Steve\_Robinson](https://techcommunity.softwareag.com/u/Steve_Robinson)\
**Post date:** [April 10, 2010, 1:05am UTC](https://techcommunity.softwareag.com/t/next-strange-error-on-nat-6-1-1/93282/6 "2010-04-10T01:05:29Z")

</div>

Hi Matthias;

Like Douglas, I cannot “play” with the problem since I am on 6.3.7, and the bug does not exist there.

Have you tried COMPRESS without NUMERIC?

If not, see what it gives you.

steve

---

<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:** [April 10, 2010, 2:13am UTC](https://techcommunity.softwareag.com/t/next-strange-error-on-nat-6-1-1/93282/7 "2010-04-10T02:13:13Z")

</div>

> [@Steve Robinson](#):
>
> Have you tried COMPRESS without NUMERIC?

No - good idea.

> [@](#):
>
> If not, see what it gives you.

```auto
before compress 1 INIT 
after compress 12603 INIT
```

… on Nat6.2.3 PL0

But it works, if you compress the single fields of the view. Like that:

```auto
compress numeric #array(#i2) 
  testview.surname
  testview.first-name-1
  testview.title
  testview.form-of-address
  into #a50 with all delimiters ";" 
```

---

<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:** [April 13, 2010, 2:24am UTC](https://techcommunity.softwareag.com/t/next-strange-error-on-nat-6-1-1/93282/8 "2010-04-13T02:24:01Z")

</div>

And this results in a NAT0938:

```auto
compress numeric #array(1) testview into #a50
```

… we talked about an update today.

---

<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:58pm UTC](https://techcommunity.softwareag.com/t/next-strange-error-on-nat-6-1-1/93282/9 "2021-04-02T14:58:19Z")

</div>


