Endevor reverse delta and use of compare columns
search cancel

Endevor reverse delta and use of compare columns

book

Article ID: 276205

calendar_today

Updated On:

Products

Endevor Endevor - ECLIPSE Plugin Endevor - Enterprise Workbench Endevor Natural Integration

Issue/Introduction

Currently using reverse deltas and have the compare columns set to 7-72 for Type Cobol.  After adding an element and making multiple changes, "tags" are now visible in columns 1-6 in the element history that were not there when these levels were originally added. 

Why is this happening? 

 

Environment

Release: All support Releases 

Resolution

The reverse delta format stores the most recent version of the code, rebuilding prior versions by backing out individual changes from the current version. The current level of the element is a full image of the element. To create a previous level of the element, Endevor applies the previous levels' delta files to the element’s current level. This process reverses, that is removes, the changes made to the current level since the previous level. Using the reverse delta format lets you store the element base in standard PDS format (not encrypted, non-compressed).

Compare Columns identify the position within each statement which Endevor begins comparing to identify change statements.  The values that are specified must be between one (1) and the SOURCE ELEMENT LENGTH.  The value that is specified in the COMPARE FROM clause must be less than or equal to the value specified in the COMPARE TO clause.

When using FORWARD or REVERSE delta formats, the columns outside the compare range will not be considered when creating a delta.  This means that information in the columns is not guaranteed to be preserved by Endevor.  This clause is specified when creating a Type definition.  Please note that if your site is using columns traditionally meant for line numbers, for example, 1-6 in COBOL to store other information like comments or tags, please make sure to include these columns in the COMPARE range.

When a new level of an element has to be created, Endevor compares the new content to the old to create the delta. The comparison is done taking the column ranges into account as defined in the type definition. For this example the Type is COBOL and the Compare Columns are 7 to 72. 

For this scenario we are using type REVERSE which has the compare columns set to 7 to 72.  

DESCRIPTION:  ===> REVERSE DELTA TYPE
UPDATED:           07NOV23 07:44 BY USER1                                

            -----------------  ELEMENT OPTIONS  -------------------          
DELTA FORMAT(F/R/I/L) ===> R  SOURCE LEN   ===> 80     ELE RECFM(N/F/V) ===> N
COMPRESS/ENCRYPT(Y/N) ===> Y  COMPARE FROM ===> 7      DFLT PROC  ===> PCOB
AUTO CONSOL (Y/N)     ===> Y  COMPARE TO   ===> 72     LANGUAGE   ===> BAL   
CONSOL AT LVL  ===> 96        REGRESSION   ===> 50     PV/LB LANG ===> TEXT  
LVLS TO CONSOL ===> 50        REG SEV(I/W/C/E)  ===> C DATA FORMAT(T/B) ===> T
USS RECFM(COMP/CR/CRLF/CRNL/F/LF/NL/V)     ===> NL     FILE EXT   ===>       
        -----------------  COMPONENT LIST OPTIONS  ------------------        
FWD/REV DELTA(F/R)    ===> R  AUTO CONSOL (Y/N)      Y CONSOL AT LVL       96
                                                      LVLS TO CONSOL      50 
        -------------------------  LIBRARIES  -----------------------        
BASE/IMAGE LIBRARY ===> HLQ.MLQ.&C1ST..BASE                    
DELTA LIBRARY      ===> HLQ.MLQ.&C1ST..DELTA                   
INCLUDE LIBRARY    ===>                                                     
SOURCE O/P LIBRARY ===>
    EXPAND INCLUDES(Y/N)  ===> N                                              

 

Added a new COBOL Element (PROGRAM1) to Endevor – When doing a browse the element 01.00 looks like this:                                                                                

-------------------------- SOURCE LEVEL INFORMATION ---------------------------                                                                              
VVLL SYNC USER     DATE    TIME     STMTS CCID         COMMENT              
---- ---- -------- ------- ----- -------- ------------ ----------------------
0100      USER1    07NOV23 08:05       20                                   
GENERATED   USER1    07NOV23 08:05                                            
                                                                             
+0100         IDENTIFICATION DIVISION.                                       
+0100         PROGRAM-ID.     AO.                                            
+0100         AUTHOR.         HAPPY GILMORE.                                 
+0100         INSTALLATION.   COMPANY NAME.                                 
+0100         DATE-WRITTEN.   DEC 01, 1990.                                   
+0100         DATE-COMPILED.  MAY 01, 2016.                                   
+0100        *REMARKS.                                                       
+0100         ENVIRONMENT DIVISION.                                          
+0100         INPUT-OUTPUT SECTION.                                          
+0100         DATA DIVISION.                                                 
+0100         FILE SECTION.                                                  
+0100         WORKING-STORAGE SECTION.                                        
+0100         01  MODULE-LOCATOR                  PIC X(36).                 
+0100         COPY COPYA.                                                    
+0100        *******************                                              
+0100         PROCEDURE DIVISION.                                            
+0100        *******************                                             
+0100        *****  WRITE HEADER RECORD  *****                               
+0100             DISPLAY 'AO UNDER QUICKEDIT' .                             
 +0100             STOP RUN.                                                  

 

Now updated the element – the following updates were made – the lines changed are highlighted in yellow.  Note that the lines with tags “XYZ” have changes made in columns 7-72.  Do a summary of levels and browse each version/level of the element –

Element 01.01 was created:

-------------------------- SOURCE LEVEL INFORMATION ---------------                                                                  
VVLL SYNC USER     DATE    TIME     STMTS CCID         COMMENT  
---- ---- -------- ------- ----- -------- ------------ ----------
0100      USER1    07NOV23 10:52       20                       
  0101      USER1    07NOV23 13:37       23                       
GENERATED   USER1    07NOV23 13:37                               

+0100         IDENTIFICATION DIVISION.                           
+0100         PROGRAM-ID.     AO.                                
+0100         AUTHOR.         HAPPY GILMORE.                     
+0100         INSTALLATION.   COMPANY NAME.                     
+0100         DATE-WRITTEN.   DEC 01, 1990.                       
+0100         DATE-COMPILED.  MAY 01, 2016.                       
+0100        *REMARKS.                                           
+0100         ENVIRONMENT DIVISION.                              
+0100         INPUT-OUTPUT SECTION.                              
+0100         DATA DIVISION.                                     
+0100         FILE SECTION.                                      
+0100         WORKING-STORAGE SECTION.                           
+0100         01  MODULE-LOCATOR                  PIC X(36).     
%+0101  XYZ    COPY COPYB.                                        
%+0101        *******************                                 
%+0101        *******************                                 
%+0101        * ADD COMMENT     *                                 
+0100        *******************                                 
+0100        *******************                                 
+0100         PROCEDURE DIVISION.                                
%+0101  XYZ   *****  WRITE HEADER ****                            
+0100             DISPLAY 'AO UNDER QUICKEDIT' .                 
+0100             STOP RUN.                                      

Element 01.00 looks like this:

-------------------------- SOURCE LEVEL INFORMATION -------------                                                             
VVLL SYNC USER     DATE    TIME     STMTS CCID         COMMENT
---- ---- -------- ------- ----- -------- ------------ --------
0100      USER1    07NOV23 10:52       20                     
                                                                
+0100         IDENTIFICATION DIVISION.                         
+0100         PROGRAM-ID.     AO.                              
+0100         AUTHOR.         HAPPY GILMORE.                   
+0100         INSTALLATION.   COMPANY NAME.                   
+0100         DATE-WRITTEN.   DEC 01, 1990.                     
+0100         DATE-COMPILED.  MAY 01, 2016.                     
+0100        *REMARKS.                                          
+0100         ENVIRONMENT DIVISION.                            
+0100         INPUT-OUTPUT SECTION.                            
+0100         DATA DIVISION.                                   
+0100         FILE SECTION.                                     
+0100         WORKING-STORAGE SECTION.                         
+0100         01  MODULE-LOCATOR                  PIC X(36).   
+0100         COPY COPYA.                                      
+0100        *******************                                
+0100        *******************                               
+0100         PROCEDURE DIVISION.                              
+0100        *****  WRITE HEADER RECORD  *****                 
+0100             DISPLAY 'AO UNDER QUICKEDIT' .               
 +0100             STOP RUN.                                      

 

Edit the element again, add tag “ABC” and update the REMARKS, add tag “ABC” to AUTHOR.  Note that the tag “ABC” on the AUTHOR line does not have any changes made in columns 7-72.  Now do a summary of levels –

0102 of the Element is created:

-------------------------- SOURCE LEVEL INFORMATION ------------                                                              
VVLL SYNC USER     DATE    TIME     STMTS CCID         COMMENT
---- ---- -------- ------- ----- -------- ------------ -------
0100      USER1    07NOV23 10:52       20                    
0101      USER1    07NOV23 13:37       23                     
0102      USER1    07NOV23 13:43       23                    
GENERATED   USER1    07NOV23 13:43                             
                                                            
+0100         IDENTIFICATION DIVISION.                         
+0100         PROGRAM-ID.     AO.                             
 +0100  ABC    AUTHOR.         HAPPY GILMORE.                  
+0100         INSTALLATION.   COMPANY NAME.                  
+0100         DATE-WRITTEN.   DEC 01, 1990.                     
+0100         DATE-COMPILED.  MAY 01, 2016.                    
%+0102  ABC   *REMARKS WILL GO HERE.                           
+0100         ENVIRONMENT DIVISION.                           
+0100         INPUT-OUTPUT SECTION.                            
+0100         DATA DIVISION.                                  
+0100         FILE SECTION.                                   
+0100         WORKING-STORAGE SECTION.                        
+0100         01  MODULE-LOCATOR                  PIC X(36).  
+0101  XYZ    COPY COPYB.                                     
+0101        *******************                              
+0101        *******************                               
+0101        * ADD COMMENT     *                              
+0100        *******************                              
+0100        *******************                             
+0100         PROCEDURE DIVISION.                              
+0101  XYZ   *****  WRITE HEADER ****                         
+0100             DISPLAY 'AO UNDER QUICKEDIT' .              
+0100             STOP RUN.                                   

0101 of the Element is created:

-------------------------- SOURCE LEVEL INFORMATION -------------
VVLL SYNC USER     DATE    TIME     STMTS CCID         COMMENT
---- ---- -------- ------- ----- -------- ------------ --------
0100      USERID   07NOV23 10:52       20                     
0101      USERID   07NOV23 13:37       23                     
                                                               
+0100         IDENTIFICATION DIVISION.                         
+0100         PROGRAM-ID.     AO.                              
 +0100  ABC    AUTHOR.         HAPPY GILMORE.                   
+0100         INSTALLATION.   COMPANY NAME.                    
+0100         DATE-WRITTEN.   DEC 01, 1990.                     
+0100         DATE-COMPILED.  MAY 01, 2016.                     
+0100        *REMARKS.                                         
+0100         ENVIRONMENT DIVISION.                             
+0100         INPUT-OUTPUT SECTION.                            
+0100         DATA DIVISION.                                   
+0100         FILE SECTION.                                    
+0100         WORKING-STORAGE SECTION.                          
+0100         01  MODULE-LOCATOR                  PIC X(36).   
%+0101  XYZ    COPY COPYB.                                      
%+0101        *******************                               
%+0101        *******************                               
%+0101        * ADD COMMENT     *                               
 +0100        *******************                               
+0100        *******************                              
+0100         PROCEDURE DIVISION.                              
%+0101  XYZ   *****  WRITE HEADER ****                          
+0100             DISPLAY 'AO UNDER QUICKEDIT' .               
 +0100             STOP RUN.                                    

 

0100 version of the element is created:


-------------------------- SOURCE LEVEL INFORMATION -------------                                                                
VVLL SYNC USER     DATE    TIME     STMTS CCID         COMMENT
---- ---- -------- ------- ----- -------- ------------ --------
0100      USERID  07NOV23 10:52       20                     
                                                               
+0100         IDENTIFICATION DIVISION.                          
+0100         PROGRAM-ID.     AO.                              
 +0100  ABC    AUTHOR.         HAPPY GILMORE.                   
+0100         INSTALLATION.   COMPANY NAME.                   
+0100         DATE-WRITTEN.   DEC 01, 1990.                      
+0100         DATE-COMPILED.  MAY 01, 2016.                     
+0100        *REMARKS.                                         
+0100         ENVIRONMENT DIVISION.                            
 +0100         INPUT-OUTPUT SECTION.                             
+0100         DATA DIVISION.                                  
+0100         FILE SECTION.                                    
+0100         WORKING-STORAGE SECTION.                         
+0100         01  MODULE-LOCATOR                  PIC X(36).   
+0100         COPY COPYA.                                      
+0100        *******************                               
+0100        *******************                               
+0100         PROCEDURE DIVISION.                              
+0100        *****  WRITE HEADER RECORD  *****                 
+0100             DISPLAY 'AO UNDER QUICKEDIT' .               
 +0100             STOP RUN.                                    

 

Notice that in 0101 and 0100 the AUTHOR is now showing ABC as the tag in columns 1-6.  The only change in the AUTHOR line is outside the compare column range. Therefore, the comparison considers the line unchanged and does not add it to the delta. When showing the history, no delta record exists, and consequently, the line is to be considered part of VV.LL 0100.  If columns 1-6 had to be taken into account, then the type definition should have had the COMPARE FROM COLUMNS set to 1-72, not 7-72.

** Note that changing the type definition will affect future delta levels only. Already existing Delta's will remain, unchanged because, at the time they were created, column ranges 7-72 were in effect. **

This is a result of how Endevor Reverse Delta works

  • The Base library always stores the current element source in its entirety not just what is in the compare range, as provided during the last update. 
  • The older levels are stored as a set of deltas (changes) from the current version. 
  • The delta calculation only looks at columns in the COMPARE FROM - COMPARE TO range, as defined in the Type definition. 

The example above is what happens when reconstructing/creating older history levels, only content inside the compare range is guaranteed to be correct. The content outside of the “compare” range was not involved in the delta calculation, so it shouldn't be relied upon for auditing.

NOTE: This is true even for FORWARD delta. The underlying assumption is that the type definition correctly identifies which columns store useful information, and the rest can be treated as 'noise' (ex. line numbers) that does not represent an actual change in the code.