With the following code I am trying to read an input file. If the input file has row1, I do not wish to process it:
/* why does undo mainloop, retry mainloop not work if within the input from */
def var cont_val as logical.
def var val1 as char.
def var val2 as char.
def var errval as int.
form
cont_val
with frame a.
mainloop:
repeat:
cont_val = no.
update cont_val with frame a.
if cont_val = false then next mainloop.
input from test.txt.
import delimiter "," val1.
display val1 .
if val1 = "row1" then do:
message "cannot process with field with row1 - back to mainloop". pause.
/* undo mainloop, leave mainloop. */ /* POINT A */
errval = 1.
end.
input close.
if errval > 0 then undo mainloop, leave mainloop. /* POINT B */
end.
why is it that if I put the undo mainloop, retry mainloop at POINT A, it does not work. But if I have it at PONT B, it works. It seems like it should work at either place. It seems like it is not working if within the input from but not sure why.
For the input file, I have the following in a text file:
row1
row2
Thanks and advance for the assistance .
/* why does undo mainloop, retry mainloop not work if within the input from */
def var cont_val as logical.
def var val1 as char.
def var val2 as char.
def var errval as int.
form
cont_val
with frame a.
mainloop:
repeat:
cont_val = no.
update cont_val with frame a.
if cont_val = false then next mainloop.
input from test.txt.
import delimiter "," val1.
display val1 .
if val1 = "row1" then do:
message "cannot process with field with row1 - back to mainloop". pause.
/* undo mainloop, leave mainloop. */ /* POINT A */
errval = 1.
end.
input close.
if errval > 0 then undo mainloop, leave mainloop. /* POINT B */
end.
why is it that if I put the undo mainloop, retry mainloop at POINT A, it does not work. But if I have it at PONT B, it works. It seems like it should work at either place. It seems like it is not working if within the input from but not sure why.
For the input file, I have the following in a text file:
row1
row2
Thanks and advance for the assistance .