nat1108 caused by fetch return

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]

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.

Hi khathutshelo,

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