# nat1108 caused by fetch return

**URL:** <https://techcommunity.softwareag.com/t/nat1108-caused-by-fetch-return/94767>\
**Category:** Forum\
**Tags:** Adabas-Natural, Adabas, Adabas-Code-Samples\
**Created:** [September 21, 2010, 5:38pm UTC](https://techcommunity.softwareag.com/t/nat1108-caused-by-fetch-return/94767 "2010-09-21T17:38:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![khathutshelo](https://avatars.discourse-cdn.com/v4/letter/k/85e7bf/32.png) [@khathutshelo](https://techcommunity.softwareag.com/u/khathutshelo)\
**Post date:** [September 21, 2010, 5:38pm UTC](https://techcommunity.softwareag.com/t/nat1108-caused-by-fetch-return/94767/1 "2010-09-21T17:38:29Z")

</div>

define data local  
1 #name (a25/10)  
1 #choice (a1/10)  
1 #error (l)  
end-define  
\*  
repeat  
input using map ‘map1’ #choice(_) #name(_)

perform check-mark

if #error-found= true  
reinput #message mark _#choice(#j) /_ nat1108  
end-if  
escape bottom  
end-repeat

* * *

define subroutine check-mark

* * *

for #j 1 to 10  
reset #error-found  
if #name(#j) ne ’ ’  
fetch return ‘prog2’  
if #error ne ’ ’  
#error-found := true  
escape routine  
end-if  
end-for  
end-subroutine

/\*Is the anyway to avoid this error except to change program ‘Prog2’ to be subprogram and use CALLNAT  
[/code]

---

<div class="post-metadata">

**Author:** ![Brian\_Johnson1](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/brian_johnson1/32/163_2.png) [@Brian\_Johnson1](https://techcommunity.softwareag.com/u/Brian_Johnson1)\
**Post date:** [September 21, 2010, 9:13pm UTC](https://techcommunity.softwareag.com/t/nat1108-caused-by-fetch-return/94767/2 "2010-09-21T21:13:49Z")

</div>

As your INPUT is already inside a REPEAT loop, you could just incorporate your error message as part of your map and let it INPUT the map again, rather than REINPUT it.

---

<div class="post-metadata">

**Author:** ![Jawahar\_A](https://avatars.discourse-cdn.com/v4/letter/j/a183cd/32.png) [@Jawahar\_A](https://techcommunity.softwareag.com/u/Jawahar_A)\
**Post date:** [October 24, 2010, 9:29am UTC](https://techcommunity.softwareag.com/t/nat1108-caused-by-fetch-return/94767/3 "2010-10-24T09:29:30Z")

</div>

Hi khathutshelo,

comment out the Reinput statement in your Main program. that will work.

---

<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:59pm UTC](https://techcommunity.softwareag.com/t/nat1108-caused-by-fetch-return/94767/4 "2021-04-02T14:59:07Z")

</div>


