$ V = F$VERIFY(0) $ SET VERIFY $ !+ $ ! RUFEXAMPLE.COM -- Command file to show how to run $ ! the example program that uses the Recovery Unit $ ! Services. This command file is also good for $ ! verifying the installation of VAX RMS Journaling. $ ! $ ! NOTE: All file names have dollar signs in them to $ ! prevent any possible conflict with user file names. $ ! Of course, any legal file name can be used instead. $ !- $ ! $ ! First, delete any old files that may be lying around. $ ! Ignore error messages here. $ ! $ SET NOON $ SET FILE RUF$*.*;*/NOAI/NOBI/NORU_J/RU_F=1/RU_A=0/PROT=OWNER=RWED $ DELETE RUF$*.*;* $ SET ON $ ! $ ! Initialize RUF$CHECKING.DAT and RUF$SAVINGS.DAT. $ ! $ CREATE/FDL=SYS$INPUT RUF$CHECKING.DAT FILE ORGANIZATION indexed RECORD FORMAT fixed SIZE 18 KEY 0 PROLOG 3 SEG0_LENGTH 9 SEG0_POSITION 0 $ COPY RUF$CHECKING.DAT RUF$SAVINGS.DAT $ ! $ ! Mark the files for all sorts of journaling. We only $ ! need RU journaling for the program, but AI and BI $ ! journaling are useful for installation verification. $ ! We expect the most popular choice to be AI plus RU. $ ! $ ! NOTE: Since the two files will be participating in $ ! the same recovery unit, they must both journal to $ ! the same long term journals. However, it is ok to $ ! AI journal to one file and BI journal to another file. $ ! $ ! NOTE: We will get a warning that our AI journal is $ ! on the same device as our data file. Normally one $ ! should put the AI journal on a different device in $ ! case the disk is wiped out, but for the purposes $ ! of installation verification this is acceptable. $ ! $ SET FILE RUF$CHECKING.DAT/AI=(FILE=RUF$AI.RMS$JOURNAL,CREATE)- /BI=(FILE=RUF$BI.RMS$JOURNAL,CREATE)/RU_J $ SET FILE RUF$SAVINGS.DAT /AI=FILE=RUF$AI.RMS$JOURNAL- /BI=FILE=RUF$BI.RMS$JOURNAL/RU_J $ ! $ ! Backup the files. Only done after marking for journaling. $ ! $ BACKUP/RECORD RUF$CHECKING.DAT RUF$CHECKING.BCK $ BACKUP/RECORD RUF$SAVINGS.DAT RUF$SAVINGS.BCK $ ! $ ! Test RU journaling by running the program. $ ! The checking balance should be $90 and the savings $110. $ ! If the program were interrupted, the balances would be restored. $ ! $ RUN SYS$EXAMPLES:RUFEXAMPLE $ ! $ ! Test AI journaling: $ ! Roll the RUF$CHECKING backup file forward and check that $ ! it matches the current state of the RUF$CHECKING data file. $ ! (There should be 0 differences encountered. You must have $ ! the DIFFERENCES program installed to be able to do this step.) $ ! $ RECOVER/FORWARD RUF$CHECKING.BCK $ SET NOON $ DIFFERENCES RUF$CHECKING.BCK RUF$CHECKING.DAT $ SET ON $ ! $ ! Test BI journaling: $ ! Roll the RUF$SAVINGS data file backward and check that it $ ! matches the original state of the RUF$SAVINGS data file. $ ! (There should be 0 differences encountered. You must have $ ! the DIFFERENCES program installed to be able to do this step.) $ ! $ RECOVER/BACKWARD RUF$SAVINGS.DAT $ SET NOON $ DIFFERENCES RUF$SAVINGS.BCK RUF$SAVINGS.DAT $ SET ON $ ! $ ! Cleanup. Ignore error messages here. $ ! $ SET NOON $ SET FILE RUF$*.*;*/NOAI/NOBI/NORU_J/RU_F=1/RU_A=0/PROT=OWNER=RWED $ DELETE RUF$*.*;* $ SET ON $ IF V .EQ. 0 THEN $ SET NOVERIFY $ EXIT