Prevent RC/Migrator Analysis Output from being executed again by accident.

Document ID : KB000056559
Last Modified Date : 06/08/2018
Show Technical Document Details
Introduction:
In a normal situation a user would not want to accidentally re-execute an CA RC/Migrator analysis after it has been competed successfully if the strategy has been reanalyzed. CA RC/Migrator is able to prevent this from happening with the use of a special command called .CHECK.

 
Question:

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?

Environment:
DB2 for z/OS
Answer:

The .CHECK command is a new Batch Processor command from the r18 release that detects the execution of a CA RC/Migrator strategy analysis output that has already been executed successfully previously and generates an error message.

The .CHECK statement is placed after the .CONNECT command.
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.


.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 ===> RBPAP200
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 ===> RBPAP200
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. 

Additional Information: