How to prevent RC/Migrator for Db2 for z/OS (RCM) from executing a reanalyzed strategy.
This error is seen by the user:
BPA0186I: STRATEGY HAS BEEN REANALYZED, EXECUTION STARTS FROM
BEGINNING. THIS IGNORES .RESTART AND .CHECK
User is worried about reanalysis being re-executed. Can re-execution be avoided?
In a normal situation a user would not want to accidentally re-execute an RC/Migrator analysis after it has been completed successfully if the
strategy has been reanalyzed. RC/Migrator is able to prevent this from happening with the use of a special command called .CHECK.
The .CHECK command is a new Batch Processor command from the r18 release that detects the execution of a RC/Migrator strategy analysis output that has already been executed successfully previously and generates an error message.
The .CHECK statement is manually placed after the .CONNECT command using an ISPF edit of the analysis output.
The check command does not have any options or parameters:
.CHECK
If the execution is a RESTART using the .RESTART command, then the .CHECK command is ignored and a message like this is seen:
.SYSTEM SQLDDL
.CONNECT ssid
RETCODE = 0
.CHECK
BPA0170I: IGNORED .CHECK CONTROL CARD AS .RESTART WAS SPECIFIED.
RETCODE = 0
If the analysis output being executed now has previously been run to completion (the last restart flag has been cleared) this is the type of message that is
seen in the execution output. The strategy name in this sample is authid.CHECK
.SYSTEM SQLDDL
.CONNECT ssid
RETCODE = 0
.CHECK
BPA0171E: EXECUTION TERMINATED. ANALYSIS OF THE STRATEGY authid.CHECK
HAS ALREADY BEEN EXECUTED SUCCESSFULLY.
RETCODE = 8
CONTROL PROCESS CARD:
BATCH PROCESSOR PLAN ===> RBPAxxxx
BATCH PROCESSOR ID ===> authid-CHECK-authid-2015061602360313
STRATEGY NAME ===> authid.CHECK
DEVICE ALLOCATION UNIT => SYSDA
BPA0144I: FINAL LOG RECORD WRITTEN FOR SUBSYSTEM ===> ssid.
***** RESTART POINT ESTABLISHED AT SYNC VALUE 0 *****
***** BATCH PROCESSOR INCOMPLETE WITH ERRORS *****
After this the restart flag is set on the BATCH PROCESSOR ID in the Restart Table.
If the analysis output is executed again the message below shows that after the first attempt a restart flag is set so that the execution must be restarted to clear
the restart status if the user absolutely wants to execute the analysis again.
.OPTION NOERRORS NOSQLERRORS RETRY(01) NOBINDERRORS +
WRAPLINE
RETCODE = 0
BPA0022E: BPID IS FLAGGED INCOMPLETE - RESTART IS REQUIRED.
RETCODE = 8
CONTROL PROCESS CARD:
BATCH PROCESSOR PLAN ===> RBPAxxxx
BATCH PROCESSOR ID ===> authid-CHECK-authid-2015061602360313
STRATEGY NAME ===> authid.CHECK
DEVICE ALLOCATION UNIT => SYSDA
BPA0144I: FINAL LOG RECORD WRITTEN FOR SUBSYSTEM ===> ssid.
***** RESTART POINT ESTABLISHED AT SYNC VALUE 0 *****
***** BATCH PROCESSOR INCOMPLETE WITH ERRORS *****
If the Analysis is restarted with a .RESTART command then the DDL is executed from where it left off (the start).
There might be inadvertent damage done by the re-execution of the analysis.