Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate code for mass delete #102

Open
patrickTingen opened this issue Sep 11, 2023 · 0 comments
Open

Generate code for mass delete #102

patrickTingen opened this issue Sep 11, 2023 · 0 comments
Assignees
Milestone

Comments

@patrickTingen
Copy link
Owner

Code for mass delete can be improved, check https://community.progress.com/s/article/P36834

example:

DEFINE VARIABLE iRecord AS INTEGER NO-UNDO.
DEFINE VARIABLE iBatch AS INTEGER NO-UNDO INITIAL 10000.

OUTER:
DO WHILE TRUE TRANSACTION:
​FOR EACH EXCLUSIVE-LOCK:
iRecord = iRecord + 1.
DELETE .

    /* Commit the current transaction(iteration) and proceed with the next.
       This will restart the FOR EACH block with the new first record. */
    IF (iRecord MODULO iBatch) EQ 0 THEN NEXT OUTER.
END.
LEAVE.

END.

@patrickTingen patrickTingen added this to the DataDigger27 milestone Sep 11, 2023
@patrickTingen patrickTingen self-assigned this Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant