Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 25 JUL 2003 09:31:47AM David E Schranz wrote:

I am encountering several weird issues when performing certain Iterative tasks using OI 32bit.

If I need to call a function from within a loop. Eg. I need to scan all tables and then scan all fields within each dictionary to perform a certain task.

The process will not work correctly unless I perform a call message between one table and the next.

It seems as though something is going wrong in memory and the message seems to be fixing the problem.

View the sample code below:

SCAN @TABLES

READ %FIELDS% FROM WITHIN THE DICT TABLE

**CALL MESSAGE TO CLEAR MEMORY

LOOP THRU FIELDS

ERROR=CALL FUNCTION VERIFY FIELDS

IF ERROR THEN STORE ERROR IN VARIABLE

REPEAT

GOTO NEXT TABLE READ

IF I DO NOT USE THE MESSAGE THEN ONCE THE SYSTEM ENCOUNTERS AN ERROR FROM THE CALLED FUNCTION, THIS ERROR IS PASSED THROUGH ALL THE NEXT FIELDS WITHIN THE TABLE LOOP.

IF I PLACE THE MESSAGE IT WORKS FINE

Any Suggestions

David Schranz


At 31 JUL 2003 05:37AM Steve Smith wrote:

David - could you post the entire program?? The algorithm doesn't give us enough to go on.

Thanks,

Steve


At 05 AUG 2003 06:17AM David E Schranz wrote:

Thanks for your interest but I solved the Problem.

(Spoke with Andrew Mc Cauley!)

The problems was that I had to insert a Call Set_Status(0) in the iterative statement.

It seems as though when a status error is encoutered in OI32 it is not automatically reset so the error keeps passing through the loop.

This statement solved the problem.

Thanks again Andrew

Regards

David Schranz

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/ddaaa21b5c3cb0fa85256d6e004a526b.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1