RC/Migrator: Avoid accidentally overwriting previously generated analysis DDL that has been executed partly and is still being used by another user.
search cancel

RC/Migrator: Avoid accidentally overwriting previously generated analysis DDL that has been executed partly and is still being used by another user.


Article ID: 54439


Updated On:


RC Compare for DB2 for z/OS RC/Migrator for DB2 for z/OS


How does RC/Migrator avoid overwriting analysis DDL that is still being executed but, may not have been completed yet?

When an Analysis is produced the Analysis Output is either placed onto a selected dataset(member) or written to Managed Output. When using a dataset(member) this always has the potential to be accidentally overwritten by another user performing an analysis.

If the original Analysis Output was still in the process of being executed in DB2 or for some reason had failed to be completed then it should be preserved at least till execution has been completed. The user of the original Analysis DDL would probably want to continue execution at some point hence the need to preserve the original DDL. If the original DDL had in the meantime been overwritten by a new analysis the original analysis DDL would be lost. If the original execution was to be restarted then this ability would be lost too unless the users own operating system could restore it from a backup. Even then the restart information on the restart table has been lost.



Release: R20
Component: RCC, RCM


When RC/Migrator produces an Analysis Output the user has the option in the users PROFILE, Update Output Specifications to choose to send the output either to a dataset(member) or to Managed Output. When the analysis output is executed by Batch Processor it must store restart information in the batch processor log table PTI.BPLOG_0203 in case that the execution must be restarted.

In order to identify a specific execution, Batch Processor stores the restart information using a "Batch Processor ID" or BPID. It generates this BPID from the DATASET(MEMBER) name or in the case of Managed output a combination of the Creator-strategy name-executor-timestamp. Regardless of the destination type a BPID is always created upon generation of analysis output and also when there is an execution. There may be multiple log records for the same BPID. The log records can be viewed via the "EXECUTION DISPLAY" facility found on the RCM main menu item 3. Use the BPID, Strategy name or creator to find the record. For a dataset the BPID will be in a format like this:


An analysis using Managed Output always creates a new uniquely named "time stamped" output where as an analysis written to a DATASET(MEMBER) will normally OVERWRITE the same DATASET(MEMBER) each time thereby overlaying the previous output. This accidental overlay or overwriting of the analysis output is the issue. It's only a problem with output to a DATASET(MEMBER) because only one BPID is ever used for each DATASET(MEMBER) no matter how many times it's executed. If the analysis output in the DATASET(MEMBER) has been executed then the "EXECUTION DISPLAY" facility will show a changed status of that execution. The TYPE "A" log record is a fresh analysis, "S" means its a SYNC point from an execution that was started. Each execution has a status column. If the execution has not been completed then the analysis output on the DATASET(MEMBER) should not be allowed to be overwritten by another analysis task before the previous one has completed execution.

On the Execution display below in the "T" column , some of the "S" type show that they stopped at a particular sync point due to some problem. Using PF11 on this screen will display more information columns to explain the condition of the SYNC point. 

PTEDL1        ------------ Execution Display Panel ----------- YYYY/MM/DD HH:MM
COMMAND ===>                                                  SCROLL ===> CSR

BPID      ==> *
DB2 SSID  ==> SSID Strat Creator ==> AUTHID1  Timestamp ==> *
Status    ==> *    Strat Name    ==> *        Type      ==> *
---------------------------------------------------------------------- AUTHID1
                                    --- Strategy ----
    BPID                            Creator  Name      St  T  Syncpoint-#  
__  AUTHID1.RBP.PDS-C0880120        AUTHID1  C0880120  NC  A            0  
__  AUTHID1.AUTHID1.USER1.BPCODE-B  AUTHID1  B0269291  NC  A            0  
__  AUTHID1.AUTHID1.USER1.BPCODE-C  AUTHID1  C0269291  NC  A            0  
__  AUTHID1.USER1.ANALYSIS-C140277  AUTHID1  C1402773  NC  A            0  
__  AUTHID1.USER1.BPCODE-ACADT001   AUTHID1  E0269291  NI  S            0  
__  AUTHID1.USER1.BPCODE-ACADT001   AUTHID1  E0269291  NC  A            0  
__  AUTHID1.USER1.BPCODE-ACT        AUTHID1  QUICKM    NC  S           10  
__  AUTHID1.USER1.BPCODE-B0269291   AUTHID1  B0269291  NI  S            0  
__  AUTHID1.USER1.BPCODE-B0269291   AUTHID1  B0269291  NC  A            0  
__  AUTHID1.USER1.BPCODE-B0269291   AUTHID1  B0269291  NC  A            0  
__  AUTHID1.USER1.BPCODE-C0269291   AUTHID1  C0269291  NC  A            0  
__  AUTHID1.USER1.BPCODE-C0269291   AUTHID1  C0269291  NC  A            0  
__  AUTHID1.USER1.BPCODE-DBCORP6    AUTHID1  QUICKM    NC  S          165  
__  AUTHID1.USER1.BPCODE-DBCRP5     AUTHID1  QUICKM    NC  S          725  

On the Analysis screen look for the OVERRIDE field:

EXECUTION MODE ===> ( O - Online, B - Batch )

OVERRIDE in analysis tells RCM whether to reuse the analysis output dataset that was used previously. "Y" if the last analysis is to be overwritten and set the log record back to a fresh start. Upon analysis it checks to see if there is a BPID in the restart table which has the same name as the BPID it is trying to analyze. If there is one there already and it's not completed it stops execution from completing the analysis so that previously unfinished analysis output is not overwritten. When an analysis override "Y" is specified a new restart record is added to indicate that it's yet to be executed and the previous restart information is lost.

Note that the OVERRIDE option on an Analysis is only available for entry when the RCM PROFILE, GLOBAL OPERATIONAL PARAMETERS, OUTPUT SPECIFICATIONS, OUTPUT TO PDS options are set to "Y". This indicates that analysis output to a dataset is required as opposed to "N" which means output to Managed Output is required. 

This is the analysis error message returned:

Note that Analysis Override is NOT the same thing as Restart Override!!
Restart Override is about restarting an execution only.

Additional Information

Execution Specifications

Monitor Strategy Analysis and Batch Processor Execution