Restore the Latest SSV of a Deleted Component

Problem statement

I accidentally deleted a component from staging that doesn’t exist in any promotion/production environment and need to get it restored. Since I only started creating this component this morning, the daily backup procedures haven’t created a copy yet, so restoring from a backup isn’t an option. Although the staging versions were enabled for the deleted component, vanilla CMN doesn’t have any built-in functionality to restore the latest (or any) version of it.

Challenge

Restore the accidentally deleted PKG component anyhow.

 Solution

Use the ASC solution ASCZ0014 (Restore Latest SSV of a Deleted Component), as shown below. Launch ASCZ0014 and enter the relevant options, as demonstrated in this example:

 ASC1 - AbitMORE® SCM Commander 1.5.7  -----------------------------------------
 Home    > CMN/ZMF Solutions > Restore latest SSV of a deleted component        
 Command =>                                                       Scroll => CSR 
                                                                                
  Restore the latest staging version of a deleted component                     
                                                                                
  Execution options                                                             
   Trace...........: N          N=No trace,Y=REXX trace,X=Xml trace             
   CMN/ZMF subsys..: R          CMN/ZMF subsystem ID                            
                                                                                
  Target selection                                                              
   Package id......: ABMR142___ Appl Id and package nr (" " or mask for list)   
   Component name..: ABM$$DEL   Component member name                           
   Component type..: SKL        Component library type (" " or mask for list)   
                                                                                
                                                                                                                                                            
  Press <ENTER> to process, <END> to return                                      

After you hit ENTER, you'll receive a ChangeMan ZMF notification (how nice ...) like this:

 CMN408I - ABMR000142 Component ABM$$DEL.SKL ACTIVATED 20240919 111159. CN(INTERNAL)                                                                            
 ***                                                                             

And sure enough, if you check the package contents again, here’s how it will appear:

 DRV#R                     STAGE: ABMR000142 Components         Row 1 to 1 of 1 
 Command ===>                                                  Scroll ===> CSR  
                                                                                
    Name             + Type Status   Changed         Procname User     Request  
    ABM$$DEL           SKL  ACTIVE   20240919 111159          RG03143   
    
 ******************************* Bottom of data ********************************                                                                               

This is exactly the version I was looking for, recovered from the staging versions in VSAM.

Conclusion

Using ASC’s solution ASCZ0014, it takes at most 1 minute to restore any accidentally deleted component in a package. Even if you had a backup from last night, why bother restoring it when you can use this quicker method?

Variation

For an existing component in production, which you checked out early this morning and spent a few hours editing, the last backup wouldn’t help you restore the most recent version (the one you spent hours developing). In such cases, ASCZ0014 also comes to the rescue.

Next
Next

Streamlining Promotion Site Renames and History Management with ASC