Description


the commands remocc and discard used within a forentity loop should modify the \'next\' occurrence set to be the next occurrence had they not been implemented, so every occurrence is passed through by the forentity loop rather than the one after the remocc being skipped.

Use Case


We frequently need to loop through an entity updating and deleting items. The new forentity loop is convenient, but does not cope with the hitlist changing while looping. As such, discard cannot be used to manage memory (hundreds of records must all remain in the hitlist) and remocc cannot be used to delete occurrences. We would particularly like to be able to either remocc without the forentity loop skipping an occurrence or flag an occurrence for deletion on the next store without affecting the hitlist. Implementing the statement :- setocc $entname,$curocc($entname)-1 right after the remocc works, UNLESS the item to be deleted is the first item in the hitlist, whence it fails. (What was occ 2 becomes occ 1, curocc cannot be < 1, when the for loop loops, $curocc becomes 2 (which used to be occurrence 3)

Importance


Useful

Type


Proc Code

Operating System


Not Applicable

Status


Open

Leave a Reply