Skip to main content
Dominique Sacre
Rocketeer
Apr 22, 2020 6:48 PM UTC

Write a Batch File to Run Recover on All Files?

I need to write a batch file that goes through all my Indexed files and runs RECOVER on them to clean them up.

Anyone have any suggestions on how I would go about doing this?

 

    1 reply

    Thomas Morrison
    Participating Frequently
    Apr 22, 2020 7:30 PM UTC

    I need to write a batch file that goes through all my Indexed files and runs RECOVER on them to clean them up.

    Anyone have any suggestions on how I would go about doing this?

     

    The recover1 utility is a command line process. It is documented in Appendix G of the RM/COBOL User Guide.  So, it is fairly easy to use it in a batch script.

    There are several command line options that are useful in batch mode.  For example, see the Q option (but study all the options - a lot depends on what you want to accomplish).  I think that the recover1 utility sets the return code so that the shell script can test for an error.  

    Tom Morrison, Consultant, South Carolina, USA