Select/Fetch – Opens the cursor only once and retrieves rows one at a time. Commits inside the step (commits in the Called Section) are ignored if the program is restartable (noticeable in the trace file) and are not ignored if the program is not restartable.
Reselect – Opens the cursor and closes the cursor on each iteration of the loop. It will re-select the same row of data. Logic in Actions of this step should be such that it changes the status of the rows in the table that the Do Select is selecting from. Commits are not ignored and will be committed in a reselect loop when the restart is enabled. A checkpoint is stored in the PS_AERUNCONTROL table once the commit is executed.
Restartable – Similar to Select/Fetch in that it opens the cursor only once and retrieves rows one at a time, but it will commit inside the loop, allowing the checkpoint to the PS_AERUNCONTROL table.
Important: Restart information is retained in the PS_AERUNCONTROL table and state records, provided state records are permanent tables and not derived/work records.
Here’s a table summarising Do Select: