ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

RGZPFM causes records to briefly disappear?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • RGZPFM causes records to briefly disappear?

    GOAL: To be able to run RGZPFM while production is running

    COMMAND: RGZPFM FILE(TESTLIB/TESTFILE) RBDACCPTH(*NO) ALWCANCEL(*YES) LOCK(*SHRUPD)

    RBDACCPTH was set to *NO to avoid the exclusive lock on the file

    ISSUE: While running the RGZPFM, a couple records will briefly disappear and then come back

    TEST CASE: I made an RPG program that ran the following steps

    -Create a record with 6 million sequential records

    -Delete the even numbered records

    -Submit the RGZPFM command listed above

    -Make "snapshots" of the file until it creates a file with less than 3 million records in it.

    -When I analyzed the "snapshot" file, I found that roughly 20 records were missing out of the middle of the file.

    THEORY: I assume this is happening because of the re-sequencing of the records?

    QUESTION: Is there any way to avoid this behavior? My goal is to be able to run RGZPFM jobs while production is running, so missing records or exclusive locks are not an option for this.

    Thank you

  • #2
    I received an answer to this in a different forum.

    It appears that it is a known bug which is solved in 7.5 TR1 and 7.4 TR7.

    With this enhancement, the Online (or cancelable) version of reorganize physical file member (RGZPFM) can be used with the assurance that active rows will no longer 'not be found' as the reorganize operation is processing.


    My org is updating to 7.4 TR7 next month, so I guess I'll put my code on the backburner until then.
    With this enhancement, the Online (or cancelable) version of reorganize physical file member (RGZPFM) can be used with the assurance that active rows will no longer 'not be found' as the reorganize operation is processing.

    Comment

    Working...
    X