import procedure executes in internal loop
Aldevinas Katkus
10-9-19
I have a problem with 8.5 2019-09-15 (build 85321027). In 8.4 this import used to crash when I execute it second or third time in a row without restarting the SERP executable.
I was advised to remove parameters (record RcVc RepSpec) from the import procedure. This did not help in 8.5: I have added a StopAlert and noticed the import procdure is being run in an endless loop. Any ideas why this happens?

global
updating procedure SomeImportIn()
begin
...

transaction longint tCount;
tCount=tCount+1;
StopAlert("executing SomeImportIn " & tCount);

while (TestEOF==false) begin
....
if (NextImportLine(false)) then begin end;
end;//while

end;

I can see alerts on the screen like
executing SomeImportIn 0
...
executing SomeImportIn 999
executing SomeImportIn 1000

So this means the import is being executed in an eternal loop. Why?
Aldevinas Katkus
10-9-19
It looks like the problem was that I haven't read all import lines:

global
updating procedure SomeImportIn()
begin

if WrongSettings then begin goto LWhile; end;
while (TestEOF==false) begin
....
if (NextImportLine(false)) then begin end;
end;//while
LWhile:;
//adding these lines avoids eternal calling of SomeImportIn()
while (TestEOF==false) begin
if (NextImportLine(false)) then begin end;
end;//while

end;
Paul Timms
10-10-19
A neater way would be as follows:

global
updating procedure SomeImportIn()

begin

while (TestEOF==false) begin
if WrongSettings then begin goto LWhile; end;
....
LWhile:;
if (NextImportLine(false)) then begin end;
end;//while
end;
Swati D.
12-3-19
Hi Aldevinas

Can we consider this request closed?

Swati
HW Support
Aldevinas Katkus
12-19-19
Created bySwati D.05:09 3 Dec 2019
Hi Aldevinas Can we consider this request closed? Swati HW Support
Yes.
Leave Comment
You can subscribe to notifications for this post by selecting the 'star' icon on the top right corner of the post.
Back to the list
Latest Posts
Hello, Kindly please report the bug so that we can further investigate and resolve it. Thank you. Best regards, Benjamin...
11:31 3 May 2024
Hi, No changes should have been made that would increase client's HDB file. Please try to delete HANSA.HDB from client folder and reconnect to server and check if it will grow to 30MB again. ...
10:14 30 Apr 2024