# Examine backward

**URL:** <https://techcommunity.softwareag.com/t/examine-backward/60993>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Linux\
**Created:** [May 16, 2006, 10:44pm UTC](https://techcommunity.softwareag.com/t/examine-backward/60993 "2006-05-16T22:44:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SABoesman](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@SABoesman](https://techcommunity.softwareag.com/u/SABoesman)\
**Post date:** [May 16, 2006, 10:44pm UTC](https://techcommunity.softwareag.com/t/examine-backward/60993/1 "2006-05-16T22:44:34Z")

</div>

Does anybody have an example of an examine backward starting from and ending at a specific point. I have tried everything, but can not get it going. Obviously, I have not tried the correct way.

I have an index of (a100/\*). Depending on where the cursur is postioned, it should find the previous position of a given search value. Options are - First, Next, Previous and Last.

---

<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:** [May 16, 2006, 10:48pm UTC](https://techcommunity.softwareag.com/t/examine-backward/60993/2 "2006-05-16T22:48:14Z")

</div>

Can you provide an example, or describe what you are trying to achieve ?

---

<div class="post-metadata">

**Author:** ![SABoesman](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@SABoesman](https://techcommunity.softwareag.com/u/SABoesman)\
**Post date:** [May 16, 2006, 11:03pm UTC](https://techcommunity.softwareag.com/t/examine-backward/60993/3 "2006-05-16T23:03:23Z")

</div>

I have an index of (a100/\*). Depending on where the cursur is postioned, it should find the previous position of a given search value. Options are - First, Next, Previous and Last.

---

<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:** [May 17, 2006, 12:25am UTC](https://techcommunity.softwareag.com/t/examine-backward/60993/4 "2006-05-17T00:25:25Z")

</div>

The direction applies to how the string is examined, not to the occurrences of the array. Each occurrence will be examined from back to front, but the occurrences will be processed from 1 to \*. Try something like

```auto

FOR #I = [i]current[/i] 1 -1
  EXAMINE DIRECTION BACKWARD array (#I) ...

```

---

<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:40pm UTC](https://techcommunity.softwareag.com/t/examine-backward/60993/5 "2021-04-02T14:40:39Z")

</div>


