Topic
  • 6 replies
  • Latest Post - ‏2014-04-30T01:25:28Z by Hai Cheng
Hai Cheng
Hai Cheng
8 Posts

Pinned topic Is it possible to run Verify&Repair by a batch file or any script?

‏2014-04-10T01:46:28Z |

Many enterprise users run Verify&Repair as a regular maintenance job for their encyclopedias.

If the size of encyclopedia is huge then it takes several hours to finish Verify&Repair. This normally will bring great performance impact.

Can we run Verify&Repair by a batch file or any script so users can run it after business hours?

Looking forward to any advice, thanks!

  • Frank OKeefe
    Frank OKeefe
    13 Posts

    Re: Is it possible to run Verify&Repair by a batch file or any script?

    ‏2014-04-22T17:04:04Z  

    Hello Hai,

    I believe you may have already found an answer for this but I found this functionality does not currently exist in System Architect.

    A Request For Enhancement (RFE 9452 ) has been created for this.

    The following URL is to that RFE.

    http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=9452

    Thanks,

    Frank O'Keefe

  • Hai Cheng
    Hai Cheng
    8 Posts

    Re: Is it possible to run Verify&Repair by a batch file or any script?

    ‏2014-04-23T00:34:39Z  

    Hello Hai,

    I believe you may have already found an answer for this but I found this functionality does not currently exist in System Architect.

    A Request For Enhancement (RFE 9452 ) has been created for this.

    The following URL is to that RFE.

    http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=9452

    Thanks,

    Frank O'Keefe

    Hi, Frank

    I have confirmed this feature is not existing in SA at this moment.

    Thanks for your RFE ID and we need to show client about this for any future inquiries.

     

    Best Regards

    Hai

  • DavidNRice
    DavidNRice
    5 Posts

    Re: Is it possible to run Verify&Repair by a batch file or any script?

    ‏2014-04-28T20:01:08Z  

    Hai,

    It is possible to write program using the API that calls the menu item for verify and repair - menu item number 327.

    Thanks

    David

  • Hai Cheng
    Hai Cheng
    8 Posts

    Re: Is it possible to run Verify&Repair by a batch file or any script?

    ‏2014-04-29T00:21:49Z  

    Hai,

    It is possible to write program using the API that calls the menu item for verify and repair - menu item number 327.

    Thanks

    David

    David

    Based on the confirmation with dev, currently there is no public API to do Verify&Repair programmatically.

    We are not sure if any internal API could do this which has not been released yet to users.

    This has been raised as RFE and hopefully dev could realize it in future releases.

    Thanks

    Hai

  • DavidNRice
    DavidNRice
    5 Posts

    Re: Is it possible to run Verify&Repair by a batch file or any script?

    ‏2014-04-29T18:44:37Z  
    • Hai Cheng
    • ‏2014-04-29T00:21:49Z

    David

    Based on the confirmation with dev, currently there is no public API to do Verify&Repair programmatically.

    We are not sure if any internal API could do this which has not been released yet to users.

    This has been raised as RFE and hopefully dev could realize it in future releases.

    Thanks

    Hai

    Hai,

    The following code will do the trick.  It is part of the public interface and the mechanism for getting the menu names to give the executemenubyname method is part of the help for that method in the object browser.  I often do both dictionary update and verify and repair this way.  Writing the program externally you can call SA, open and encyclopedia (wait for it to completely open) and then run the maintenance routines.  I hope this helps.

    Sub RunVerifyAndRepair()
        Dim SAApp As SA2001.Application
       
        Set SAApp = New SA2001.Application
        SAApp.Encyclopedia.OpenLock (NETOPENUPDATE)
        SAApp.Encyclopedia.OpenObjectsAsReadOnly = False
       
        SAApp.ExecuteMenubyName ("SAIDM_327")
       
        SAApp.Encyclopedia.CloseUnLock (NETOPENUPDATE)
        Set SA = Nothing
        MsgBox "Verify and Repair Done"
    End Sub

  • Hai Cheng
    Hai Cheng
    8 Posts

    Re: Is it possible to run Verify&Repair by a batch file or any script?

    ‏2014-04-30T01:25:28Z  

    Hai,

    The following code will do the trick.  It is part of the public interface and the mechanism for getting the menu names to give the executemenubyname method is part of the help for that method in the object browser.  I often do both dictionary update and verify and repair this way.  Writing the program externally you can call SA, open and encyclopedia (wait for it to completely open) and then run the maintenance routines.  I hope this helps.

    Sub RunVerifyAndRepair()
        Dim SAApp As SA2001.Application
       
        Set SAApp = New SA2001.Application
        SAApp.Encyclopedia.OpenLock (NETOPENUPDATE)
        SAApp.Encyclopedia.OpenObjectsAsReadOnly = False
       
        SAApp.ExecuteMenubyName ("SAIDM_327")
       
        SAApp.Encyclopedia.CloseUnLock (NETOPENUPDATE)
        Set SA = Nothing
        MsgBox "Verify and Repair Done"
    End Sub

    Hi, David

    Thanks for your sample code, I misunderstood your question.

    Yes, this code will do what you want. However, it needs SA to be launched then the corresponding menu item will be called.

    It is still slightly different than running a batch or script OOTB to run Verify&Repair as a separate job.

    If we have this feature then users can schedule Verify&Repair as a windows job and run it out of business time.

    This brings much convenience to users because this maintenance job will not take their normal working time anymore.

    Cheers