# move left with dynamics --\> NAT0232

**URL:** <https://techcommunity.softwareag.com/t/move-left-with-dynamics-nat0232/76554>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Linux\
**Created:** [April 15, 2008, 2:52pm UTC](https://techcommunity.softwareag.com/t/move-left-with-dynamics-nat0232/76554 "2008-04-15T14:52:53Z")\
**Posts on this page:** 4\
**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 15, 2008, 2:52pm UTC](https://techcommunity.softwareag.com/t/move-left-with-dynamics-nat0232/76554/1 "2008-04-15T14:52:53Z")

</div>

Hello all!

I don’t understand why MOVE LEFT doesn’t work with Dynamic target fields. Is there a reason?  
Sample:

```auto
define data local
01 #a10 (A10) init <' abc'>
01 #a (A) DYNAMIC init <' def'>
01 #i4 (I4)
end-define
display #a10 #a (AL=10)
*
move left #a10 to #a10 /* works fine
move left #a to #a /* NAT0232 here
*
* /* so we have to do a for-loop
for #i4 = 1 to *LENGTH(#a)
  if substr(#a,#i4,1) ne " "
    move substr (#a,#i4) to #a
    escape bottom
  end-if
end-for
display #a10 #a (AL=10)
*
end
```

---

<div class="post-metadata">

**Author:** ![Weihnachtsbar](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/weihnachtsbar/32/146_2.png) [@Weihnachtsbar](https://techcommunity.softwareag.com/u/Weihnachtsbar)\
**Post date:** [April 15, 2008, 6:07pm UTC](https://techcommunity.softwareag.com/t/move-left-with-dynamics-nat0232/76554/2 "2008-04-15T18:07:49Z")

</div>

What do you think the result of move left is:

- remove leading blanks?
- remove leading and trailing blanks?
- leave the dynamic the same size an remove leading blanks and fill up with blanks up to the original \*length()?

Your example would be more equal to the #A10 example if you use:

```auto
01 #a (A) DYNAMIC init <' def '> 
```

and then you should check \*length(#a), too.

If you want to remove leading/trailing blanks may use \*trim() on the PC/UNIX only,  
or a equivalent to move left

```auto
compress full #a (pm=i) into #a
move #a (pm=i) to #a
```

to leave the original \*length().

---

<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 16, 2008, 11:55am UTC](https://techcommunity.softwareag.com/t/move-left-with-dynamics-nat0232/76554/3 "2008-04-16T11:55:26Z")

</div>

[quote="Weihnachtsb

---

<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:49pm UTC](https://techcommunity.softwareag.com/t/move-left-with-dynamics-nat0232/76554/4 "2021-04-02T14:49:21Z")

</div>


