home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / netdor3.zip / DISK_12 / IMAGE11.ZIP / ADMTOOLS / verimage.cmd < prev   
OS/2 REXX Batch file  |  1993-09-02  |  47KB  |  850 lines

  1. /* VerIMAGE - Read the Contents.COR file and check if all the files
  2.  *           exist on the Image disk.
  3.  * Author:   Tom Heald (Heald at Almaden)
  4.  *****************************************************************************
  5.  *                    Licensed Materials-Property of IBM                     *
  6.  *               5604-472 (c) Copyright IBM Corporation, 1993                *
  7.  *                           All rights reserved.                            *
  8.  *                  US Government Users Restricted Rights -                  *
  9.  *                 Use, duplication or disclosure restricted                 *
  10.  *                by GSA ADP Schedule Contract with IBM Corp.                *
  11.  *****************************************************************************
  12.  * Change History:
  13.  * 11/14/91 - ATH - Fix WasteBin problem.
  14.  *  1/20/92 - ATH - Fix to look for filespec's with blanks.
  15.  *  7/24/92 - ATH - Total rewrite to do more checking etc.  Changed lines
  16.  *                  are not marked.
  17.  *  7/30/92 - ATH - Only set the error return code on missing files for now!
  18.  *                  Change COREList.Fil to Contents.Cor
  19.  *  8/04/92 - ATH - Change the way Contents.Cor is checked.
  20.  *  8/06/92 - ATH - Change start of data for sort.
  21.  *  8/10/92 - ATH - Change to call RxStemSort.
  22.  *  8/12/92 - ATH - Add the /Sunc option.
  23.  *  9/23/92 - ATH - Update Help Text.
  24.  *  9/25/92 - ATH - Add the Retry and List options.
  25.  * 10/06/92 - ATH - Use XCopy and check Date/Time/Size after copy.
  26.  * 10/16/92 - ATH - Add NetClose option
  27.  * 10/29/92 - ATH - Remove need for response file.
  28.  * 11/09/92 - DSK - Add CMD_Name reference. Change to YKT NOTIFY.CMD
  29.  * 11/13/92 - ATH - Add CODE to check for empty directories.
  30.  *  4/27/93 - ATH - Add LOG option to change the name of the log file.
  31.  **********************************************************************/
  32.  
  33.    Trace "O"
  34.    "@ECHO OFF"
  35.    Debug = 0
  36.    Time_Run = 1
  37.    TS_This = Time('E')
  38.    Target_File = "CONTENTS.COR"   /* Must be upper case    ATH  7/30/92 */
  39.    Target_Bak  = "CONTENTS.BAK"   /* Backup file name      ATH  8/12/92 */
  40.    Temp_File   = "VerIMAGE.TMP"   /* Temp file name to download 8/12/92 */
  41.    Output_File = "VerIMAGE.Log"
  42.    NetClose    = 'NetClose.Exe' /* NetClose Command FSpec  ATH 10/16/92 */
  43.    Server_Alias = ''            /* NetClose Server         ATH 10/16/92 */
  44.    New          = 0               /* Replace flag off      ATH  8/12/92 */
  45.    Rep          = 1               /* Replace flag on       ATH  8/12/92 */
  46.    Copied_Ct    = 0    /* Count good copies                ATH 10/06/92 */
  47.    Download_Ct  = 0    /* Error Counter  */
  48.    Backlevel_Ct = 0    /* Error Counter  */
  49.    Missing_Ct   = 0    /* Error Counter  */
  50.    Erase_Ct     = 0    /* Error Counter  */
  51.    Error_Ct     = 0    /* Error Counter */
  52.    Dir_Ct       = 0    /* Error Counter                    ATH 11/13/92 */
  53.    Dir_List.0   = 0    /* Directories to erase.            ATH 11/13/92 */
  54.    Send_Msg     = 0 /* No Error Msg */
  55.    Erase_Old    = 0 /* Do not erase old files */
  56.    Ask_User     = 1 /* Ask the user to verify all erases */
  57.    Sync_Image   = 0 /* do not sync the machine.     */
  58.    List_Only    = 0 /* Create Contents.Cor file to test.   ATH  9/25/92 */
  59.    Retry_Count  = 3 /* Default Retry count                 ATH  9/25/92 */
  60.    Net_Close    = 0 /* Default to no NetClose              ATH 10/16/92 */
  61.  
  62.    Parse Upper Source . CMD_Type CMD_FS . /* Get Prog info ATH 10/16/92 */
  63.    CMD_I = lastpos('\', CMD_FS)          /* End of path    ATH 10/16/92 */
  64.    CMD_Path = Left(CMD_FS, CMD_I)        /* Get Path       ATH 10/16/92 */
  65.    CMD_FN = SubStr(CMD_FS, CMD_I+1)      /* Get filename   ATH 10/16/92 */
  66.    Parse Var CMD_FN CMD_Name '.' Cmd_Ext /* Get Name & ext ATH 10/16/92 */
  67.  
  68.    Parse upper Arg Core_Dir junk "/" Option etc
  69.      Do while Option <> ""
  70.        Select
  71.          When Abbrev("MESSAGE", Option,1) Then Call Set_Msg;
  72.          When Abbrev("MSG",     Option,1) Then Call Set_Msg;
  73.          When Abbrev("NEW",     Option,1) Then Call Erase_File Output_File;
  74.          When Abbrev("ERASE",   Option,1) Then Erase_Old = 1
  75.          When Abbrev("YES",     Option,1) Then Ask_User = 0
  76.          When Abbrev("DEBUG",   Option,1) Then Debug = 1
  77.          When Abbrev("LIST",    Option,2) Then List_Only = 1 /* ATH  4/29/93 */
  78.          When Abbrev("LOG",     Option,2) Then Do       /* ATH  4/27/93 */
  79.              Parse Var etc Log_File etc   /* Get filename  ATH  4/27/93 */
  80.              If Log_File = ""                           /* ATH  4/27/93 */
  81.                 Then Do                                 /* ATH  4/27/93 */
  82.                   Say 'The name of the Log file must follow the "/'Option'" option.'
  83.                   Call Exit_RC 1                        /* ATH  4/27/93 */
  84.                   end                                   /* ATH  4/27/93 */
  85.                 Else Output_File = Log_File /* Set output  ATH  4/27/93 */
  86.              end                                        /* ATH  4/27/93 */
  87.          When Abbrev("SYNC",    Option,1) Then Do       /* ATH  8/12/92 */
  88.               Sync_Image = 1     /* Set the option          ATH  8/12/92 */
  89.               Parse Var etc Master_CORE etc /* Get name    ATH  8/12/92 */
  90.               If Master_CORE = ""                       /* ATH  8/12/92 */
  91.                  Then Do                                /* ATH  8/12/92 */
  92.                    Say 'The Remote NetDoor directory is missing after the "/Sync" option.'
  93.                    Call Exit_RC 1                       /* ATH 10/16/92 */
  94.                    end                                  /* ATH  8/12/92 */
  95.               If Right(Master_CORE,1) <> "\" Then Master_CORE = Master_CORE"\"
  96.               end                                       /* ATH  8/12/92 */
  97.          When Abbrev("RETRY",   Option,1) Then Do       /* ATH  9/25/92 */
  98.               Parse Var etc Retry_Count etc /* Get count   ATH  9/25/92 */
  99.               If \datatype(Retry_Count,n)               /* ATH  9/25/92 */
  100.                  Then Do                                /* ATH  9/25/92 */
  101.                    Say 'The retry count must be a numeric value.'
  102.                    Call Exit_RC 1                       /* ATH 10/16/92 */
  103.                    end                                  /* ATH  9/25/92 */
  104.               end
  105.          When Abbrev("NETCLOSE", Option,4) Then Do      /* ATH 10/16/92 */
  106.               Parse Var etc NC_Path etc /* Path to close   ATH 10/16/92 */
  107.               If Right(NC_Path,1) <> "\" Then NC_Path = NC_Path"\"  /* ATH 10/16/92 */
  108.               'DIR' NC_Path'*.* >nul 2>&1'  /* Test Path   ATH 10/16/92 */
  109.               If RC <> 0 Then Do         /* Any problems?  ATH 10/16/92 */
  110.                  Say 'The NetClose path "'NC_Path'" can not be found.'  /* ATH 10/16/92 */
  111.                  Call Exit_RC 1                         /* ATH 10/16/92 */
  112.                  end                                    /* ATH 10/16/92 */
  113.               NC_Exe = RxSearchPath("PATH", NetClose)   /* ATH 10/16/92 */
  114.               If NC_Exe = ""                            /* ATH 10/16/92 */
  115.                  Then Do                                /* ATH 10/16/92 */
  116.                    Say 'The "'NetClose'" command was not found.'             /* ATH 10/16/92 */
  117.                    Say 'Add it to the search path before using this option.' /* ATH 10/16/92 */
  118.                    Call Exit_RC 1                       /* ATH 10/16/92 */
  119.                    end                                  /* ATH 10/16/92 */
  120.                  Else NetClose = NC_Exe                 /* ATH 10/16/92 */
  121.                  Net_Close = 1 /* Set the option           ATH 10/16/92 */
  122.               end                                       /* ATH 10/16/92 */
  123.          Otherwise Do;
  124.            Say 'Invalid Option:' Option
  125.            Call Exit_RC 2                               /* ATH 10/16/92 */
  126.            End
  127.        End    /* Select */
  128.        Parse var etc junk "/" Option etc
  129.      End    /* Do while */
  130.  
  131.    If Core_Dir = ""
  132.       Then Do
  133.         Say "The drive and path are required input. i.e. VerImage W:\ or VerImage D:\DOOR01\"
  134.         Call Exit_RC 2                                  /* ATH 10/16/92 */
  135.       End
  136.  
  137.    If Core_Dir = ?  Then Signal Help
  138.    If Abbrev("HELP", Core_Dir,1) Then Signal Help;
  139.    If Right(Core_Dir,1) <> "\" Then Core_Dir = Core_Dir"\"
  140.    Core_Root = Left(Core_Dir,3)
  141.    Input_File = Core_Dir || Target_File
  142.  
  143.    /* Add List Only Subroutine                             ATH  9/25/92 */
  144.    If List_Only Then Do    /* Do we want to make a list?    */
  145.       Call List_CORE_Dir    /* List and sort the CORE Dir.  */
  146.       If Time_Run Then Say 'Writing "'Input_File'" at' Time_Stamp()
  147.       RC = RxWrite(Input_File,"CORE_Disk")  /* Write list   */
  148.       If Time_Run Then Say 'Write Return Code = "'RC'" at' Time_Stamp()
  149.       Call Exit_RC 0                                    /* ATH 10/16/92 */
  150.       end
  151.  
  152.    If Sync_IMAGE Then Do    /* Do we want to Sync CORE?     ATH  8/12/92 */
  153.       Master_File = Master_CORE || Target_File          /* ATH  8/12/92 */
  154.       Master_Temp = CORE_Dir || Temp_File               /* ATH  8/12/92 */
  155.       If RxFileExist(Master_File) Then Do               /* ATH  8/12/92 */
  156.          If Time_Run Then Say 'Getting "'Input_File'" at' Time_Stamp()
  157.          "ECHO NO | XCOPY" Master_File Master_Temp '>nul 2>&1'   /* Get file ATH 10/06/92 */
  158.          If RC = 0   /* Any errors?                        ATH  8/12/92 */
  159.             Then Do  /* If OK then rename the temp file    ATH  8/12/92 */
  160.               Call RxTree Input_File, 'Temp', 'F', '*****', '***-*'
  161.               If Temp.0 > 0 then 'Erase' Input_File /* Erase old file. ATH  8/12/92 */
  162.               'Rename' Master_Temp Target_File /* New one  ATH  8/12/92 */
  163.               end                                       /* ATH  8/12/92 */
  164.             Else Do  /* if error erase temp and exit.      ATH  8/12/92 */
  165.               If RxFileExist(Master_Temp) Then 'Erase' Master_Temp
  166.               Say 'Error downloading "'Master_File'".'  /* ATH  8/12/92 */
  167.               Call Exit_RC 2                            /* ATH 10/16/92 */
  168.               end
  169.          end /* If RxFileExist Then do */
  170.          else Do  /* Can't find the Master list file       ATH  8/12/92 */
  171.            Say '"'Master_File'" does not exist.'        /* ATH  8/12/92 */
  172.            Call Exit_RC 2                               /* ATH 10/16/92 */
  173.          end /* If RxFileExist Else do                     ATH  8/12/92 */
  174.    end  /* If Sync_IMAGE */                              /* ATH  8/12/92 */
  175.  
  176.    /* Move Subroutine from before /sync code               ATH  9/25/92 */
  177.    If Stream(Input_File,'c','query exists') = ""
  178.       Then Do
  179.         Say Input_File "does not exist."
  180.         Call Exit_RC 2                                  /* ATH 10/16/92 */
  181.       End
  182.  
  183.    Call Get_Input_File   /* Read and sort the input file   ATH  9/25/92 */
  184.    Call List_CORE_Dir    /* List and sort the CORE Dir.    ATH  9/25/92 */
  185.  
  186.    L1 = 0                              /* init CORE_Disk index */
  187.    D1 = 0                              /* init CORE_Disk index */
  188.    L_Spec = X2C(00)                    /* init */
  189.    D_Spec = L_Spec                     /* init */
  190.    End_Of_File = 0                     /* init */
  191.    End_Of_List = 0                     /* init */
  192.  
  193.    If Time_Run Then Say 'Comparing  "'CORE_Dir'"  lists   at' Time_Stamp()
  194.    Call Get_List_Rec                   /* Get first record */
  195.    Call Get_Disk_Rec
  196.    Do Until End_Of_File + End_Of_List = 2
  197.       If Debug Then Say 'Comp. "'L_Spec'" to "'D_Spec'".'
  198.       Select
  199.         When L_Spec = D_Spec Then Do  /* When equal check Date, Time & size */
  200.              If L_Date <> D_Date | L_Time <> D_Time | L_Size <> D_Size
  201.                 Then Call Error_Equal
  202.              Call Get_List_Rec     /* Get the Next records */
  203.              Call Get_Disk_Rec
  204.              end
  205.         When L_Spec < D_Spec Then Do  /* When low file missing locally */
  206.              Call Error_Low
  207.              Call Get_List_Rec     /* Get the Next record */
  208.              end
  209.         Otherwise Do            /* When High file should be erased locally */
  210.              Call Error_High
  211.              Call Get_Disk_Rec     /* Get the Next record */
  212.              End
  213.       End  /* Select */
  214.    End /* Do Until */
  215.  
  216.    Do Dir_I = Dir_List.0 to 1 by -1  /* Remove empty dir.  ATH 11/13/92 */
  217.       Dir_Spec  = Dir_List.Dir_I                        /* ATH 11/13/92 */
  218.       Parse Var Dir_List.Dir_I D_Date D_Time D_Size D_Spec  /* 11/13/92 */
  219.       If Erase_Old Then Do  /* Only remove if told to      ATH 11/13/92 */
  220.          'RmDir "'D_Spec'"'                             /* ATH 11/13/92 */
  221.          If RC = 0                      /* All ok?         ATH 11/13/92 */
  222.             Then Log_Msg = "(Removed)"  /* Yes             ATH 11/13/92 */
  223.             Else Do                     /* No              ATH 11/13/92 */
  224.               Log_Msg = "(RmDir RC =" RC")"             /* ATH 11/13/92 */
  225.               Dir_Ct = Dir_Ct + 1                       /* ATH 11/13/92 */
  226.             end                                         /* ATH 11/13/92 */
  227.          end /* If Erase_Old Then */
  228.          Else Do /* Tell the user about the empty Dir.     ATH 11/13/92 */
  229.            Log_Msg = '(Should be removed)' /* Empty dir    ATH 11/13/92 */
  230.            Dir_Ct = Dir_Ct + 1  /* Error count             ATH 11/13/92 */
  231.          end
  232.       Fill_Ct = 30 - Length(D_Spec)                     /* ATH 11/13/92 */
  233.       If Fill_Ct < 0 then Fill = ""; else Fill = Left(" ",Fill_Ct)
  234.       Out_Line = Right(D_Date,8) Right(D_Time,6) Right('Dir',8) D_Spec ,
  235.                  Fill || Log_Msg                        /* ATH 11/13/92 */
  236.       Call Log_Output                                   /* ATH 11/13/92 */
  237.    end  /* Do Dir_I */                                  /* ATH 11/13/92 */
  238.  
  239.    If Time_Run Then Say '    End of "'CORE_Dir'" compare  at' Time_Stamp()
  240.  
  241.    Call Lineout Output_File    /* Close the output file */
  242.  
  243.    Error_Ct = Backlevel_Ct + Missing_Ct + Erase_Ct ,
  244.             + Download_Ct + Dir_Ct                      /* ATH 11/13/92 */
  245.  
  246.    Say
  247.    If Download_Ct > 0 Then Do                           /* ATH  8/12/92 */
  248.       If Download_Ct > 1 Then s = 's'; else s = ''      /* ATH  8/12/92 */
  249.       Say Download_Ct 'error's' downloading from "'Master_CORE'".'
  250.       end
  251.    If Backlevel_Ct > 0 Then Do                          /* ATH  8/04/92 */
  252.       If Backlevel_Ct > 1 Then s = 's'; else s = ''     /* ATH  8/04/92 */
  253.       Say Backlevel_Ct 'wrong level file's' found.  (Date, time or size difference.)'
  254.       end
  255.    If Missing_Ct > 0 Then Do                            /* ATH  8/04/92 */
  256.       If Missing_Ct > 1 Then s = 's'; else s = ''       /* ATH  8/04/92 */
  257.       Say Missing_Ct 'missing file's' detected.'
  258.       end
  259.    If Erase_Ct > 0 Then do                              /* ATH  8/04/92 */
  260.       If Erase_Ct > 1 Then s = 's'; else s = ''         /* ATH  8/04/92 */
  261.       Say Erase_Ct 'extra file's' found that should be erased.'
  262.       end
  263.    If Dir_Ct > 0 Then do                                /* ATH 11/13/92 */
  264.       If Dir_Ct > 1 Then s = 'ies'; else s = 'y'        /* ATH 11/13/92 */
  265.       Say Dir_Ct 'empty director's' found that should be removed.'
  266.       end
  267.  
  268.    If Error_Ct + Copied_Ct + Dir_List.0 > 0 /* A log ent.  ATH 11/13/92 */
  269.       Then Do   /* If there were any log entries add a Error Ct line.   */
  270.         If Error_Ct <> 1 Then s = 's'; else s = ''      /* ATH  8/04/92 */
  271.         Out_Line = Error_Ct 'Error's' found in the "'Core_Dir'" directory on' Date(u) 'at' Time()'.'
  272.         If Error_Ct > 0 Then Say Out_Line               /* ATH 10/16/92 */
  273.         Call LineOut Output_File, Out_Line
  274.         if Result = 1 then Signal Write_Err
  275.       End
  276.  
  277.    If Error_Ct = 0  /* Any errors at all? */
  278.       Then Do
  279.         Ret_Code = 0
  280.         Say 'All "'Core_Dir'" files present and accounted for on' Date(u) 'at' Time()'.'
  281.       End
  282.       Else Do                                           /* ATH 10/16/92 */
  283.         Ret_Code = 3                                    /* ATH 10/16/92 */
  284.       End                                               /* ATH 10/16/92 */
  285.  
  286. Call Exit_RC Ret_Code                                   /* ATH 10/16/92 */
  287.  
  288. /*------------------------ Sub Routines --------------------------------*/
  289.  
  290. /*----------------------------------------------------------------------*/
  291. /* Make inline code a subroutine                           ATH  9/25/92 */
  292. Get_Input_File:
  293.    If Time_Run Then Say 'Reading "'Input_File'" at' Time_Stamp()
  294.    RC = RxRead(Input_File,"CORE_List") /* Read the List of files from COREUp */
  295.    If RC <> 0 then Signal Read_Err
  296.    Do I1 = 1 to CORE_List.0
  297.       CORE_List.I1 = Translate(CORE_List.I1)     /* All Upper case */
  298.       end
  299.  
  300.    If Time_Run Then Say 'Sorting "'Input_File'" at' Time_Stamp()
  301.    SS_In = Pos(":\", CORE_List.1) + 2                   /* ATH  8/10/92 */
  302.    Call RxStemSort "CORE_List", "A", SS_In              /* ATH  8/10/92 */
  303.    If Debug Then Do I1 = 1 to CORE_List.0
  304.       Say Right(I1,3) CORE_List.I1
  305.       end
  306. Return
  307.  
  308. /*----------------------------------------------------------------------*/
  309. /* Make inline code a subroutine                           ATH  9/25/92 */
  310. List_CORE_Dir:
  311.    If Time_Run Then Say 'Listing  files  on  "'CORE_Dir'" at' Time_Stamp()
  312. /* RC = RxTree(CORE_Dir,"CORE_Disk", "SF")     List files on CORE Disk  */
  313.    RC = RxTree(CORE_Dir,"CORE_Disk", "SB")  /* List files. ATH 11/13/92 */
  314.    Do I1 = 1 to CORE_Disk.0
  315.       CORE_Disk.I1 = Translate(CORE_Disk.I1)     /* All Upper case */
  316.       If SubStr(Word(CORE_Disk.I1, 4), 2,1) = 'D'
  317.          Then CORE_Disk.I1 = Strip(CORE_Disk.I1,"T")||'\'
  318.       end
  319.  
  320.    If Time_Run Then Say 'Sorting  files from "'CORE_Dir'" at' Time_Stamp()
  321.    SS_In = Pos(CORE_Dir, CORE_Disk.1) + Length(Core_Dir)/* ATH  8/10/92 */
  322.    Call RxStemSort "CORE_Disk", "A", SS_In              /* ATH  8/10/92 */
  323.    If Debug Then Do I1 = 1 to CORE_Disk.0
  324.       Say Right(I1,3) Core_Disk.I1
  325.       end
  326. Return
  327.  
  328. /*----------------------------------------------------------------------
  329.  * Get the next record from the CORE Source disk list file
  330.  * Input:  L1       - Pointer to the last record.
  331.  * Output: L_Date, L_Time, L_Size, L_Att  - From RxTree
  332.  *         L_Spec   - File spec without drive ID i.e. no "W:\"
  333.  *         L_Path   - Full path without drive ID.
  334.  *         L_Dir    - First path in the Filespec.
  335.  *         L_FN     - The file name and ext.
  336.  *         L_In     - The length of the path.
  337.  *----------------------------------------------------------------------*/
  338.  
  339. Get_List_Rec:
  340.   Path_OK = 0       /* Reset                               ATH  8/04/92 */
  341.   Do Until Path_OK
  342.      Last_L_Spec = L_Spec      /* Save last Spec to test sort */
  343.      L1 = L1 + 1        /* Next record in the list */
  344.      If L1 > CORE_List.0 Then Do
  345.         End_Of_List = 1
  346.         L_Spec = X2C('FF') || '<-FF' /* Make List High to get Disk. ATH  8/06/92 */
  347.         If Debug Then Say 'List' Right(L1, 4) '= "End of List"'
  348.         Return
  349.         End
  350.      Parse Upper Var CORE_List.L1 L_Date L_Time L_Size L_Att x ":\" L_Spec
  351.      L_Spec = Strip(L_Spec)    /* Remove Trailing blanks */
  352. /*   L_Date = Translate(L_Date,"/","-")                    ATH 11/13/92 */
  353.      Parse Var L_Spec L_Dir "\" y                       /* ATH 11/13/92 */
  354.      L_In = lastpos('\', L_Spec)   /* Last "\" before FN   ATH 11/13/92 */
  355.      L_Path = Left(L_Spec, L_In)   /* Get Path             ATH 11/13/92 */
  356.      L_FN = SubStr(L_Spec, L_In+1) /* Get the filename     ATH 11/13/92 */
  357.      /* Skip the Local and wastebin directories + all Directory Att. */
  358. /*   If L_Dir = "WASTEBIN" | L_Dir = "LOCAL" | Substr(L_Att,2,1) = "D"      ATH 11/13/92 */
  359.      If L_Dir = "WASTEBIN" | L_Dir = "LOCAL"            /* ATH 11/13/92 */
  360.         Then Path_Ok = 0         /* Get next record from the List */
  361.         Else Path_Ok = 1         /* Path ok */
  362.      If Last_L_Spec > L_Spec then Do   /* Debug code to check sort */
  363.         Say 'Warning - List file is not sorted correctly.  Index =' L1,
  364.         '"'Last_L_Spec'" > "'L_Spec'".'
  365.         end
  366.   End
  367.   If Debug Then Say 'List' Right(L1, 4) '=' ,
  368.      Right(L_Date,8) Right(L_Time,6) Right(L_Size,8) L_Spec
  369.   If L_Spec = ""
  370.      Then Do
  371.        Say 'Error in' Input_File 'line' L1'.'
  372.        Say CORE_List.L1
  373.        Call Exit_RC 2                                   /* ATH 10/16/92 */
  374.      End
  375. Return
  376.  
  377. /*----------------------------------------------------------------------
  378.  * Get the next record from the Local disk file
  379.  * Input:  D1       - Pointer to the last record.
  380.  * Output: D_Date, D_Time, D_Size, D_Att  - From RxTree
  381.  *         D_Spec   - File spec without drive ID i.e. no "W:\"
  382.  *         D_Path   - Full path without drive ID.
  383.  *         D_Dir    - First path in the Filespec.
  384.  *         D_FN     - The file name and ext.
  385.  *         D_In     - The length of the path.
  386.  *----------------------------------------------------------------------*/
  387.  
  388. Get_Disk_Rec:
  389.   Path_OK = 0       /* Reset                               ATH  8/04/92 */
  390.   Do Until Path_OK
  391.      Last_D_Spec = D_Spec       /* Save last spec to test the sort */
  392.      D1 = D1 + 1        /* Next record in the list */
  393.      If D1 > CORE_Disk.0 Then Do
  394.         End_Of_File = 1
  395.         End_Of_File = 1
  396.         D_Spec = X2C('FF') || '<-FF' /* Make Disk High to get List. ATH  8/06/92 */
  397.         D_Att  = ""                  /* Reset              ATH 11/13/92 */
  398.         If Debug Then Say 'Disk' Right(D1, 4) '= "End of File"'
  399.         Return
  400.         End
  401.      Parse Upper Var CORE_Disk.D1 D_Date D_Time D_Size D_Att x ,
  402.            Value(CORE_Dir) D_Spec  /* Only the common data ATH  8/06/92 */
  403.      D_Spec = Strip(D_Spec)    /* Remove Trailing blanks */
  404.      Parse Var D_Spec D_Dir  "\" y                      /* ATH 11/13/92 */
  405.      D_In = lastpos('\', D_Spec)    /* Last "\" before FN */
  406.      D_Path = Left(D_Spec, D_In)    /* Get Path            ATH 11/13/92 */
  407.      D_FN = SubStr(D_Spec, D_In+1)  /* Get the filename */
  408.      /* Skip the Local and wastebin directories and Local files. */
  409.      If D_Dir = "WASTEBIN" | D_Dir = "LOCAL" |, /* 1st Dir ATH 11/13/92 */
  410.         D_FN = "$$$MB$$$.LOG"              /* Local Files  ATH  8/04/92 */
  411.         Then Path_Ok = 0         /* Get next record from the List */
  412.         Else Path_Ok = 1         /* Path ok */
  413.      If Last_D_Spec > D_Spec then Do   /* Debug code to check sort */
  414.         Say 'Warning - Disk file is not sorted correctly.  Index =' D1,
  415.         '"'Last_D_Spec'" > "'D_Spec'".'
  416.         end
  417.   End
  418.   If Debug Then Say 'Disk' Right(D1,4) '=' ,
  419.      Right(D_Date,8) Right(D_Time,6) Right(D_Size,8) D_Spec
  420. Return
  421.  
  422. /*----------------------------------------------------------------------*
  423.  * When Equal a file has a different Date, time or size                 *
  424.  *----------------------------------------------------------------------*/
  425. Error_Equal:
  426.   /* The Target file will be a different date/time. don't count as err. */
  427.   If D_FN = Target_File Then Return                     /* ATH  8/04/92 */
  428.   If Sync_IMAGE   /* If Sunc the CORE disk via NFS          ATH  8/12/92 */
  429.      Then Call Download Rep    /* Copy data from Master    ATH  8/12/92 */
  430.      Else Do     /* Show the error                         ATH  8/12/92 */
  431.        Backlevel_Ct = Backlevel_Ct + 1
  432.        Fill_Ct = 30 - Length(L_Spec)
  433.        If Fill_Ct < 0 then Fill = ""; else Fill = Left(" ",Fill_Ct)
  434.        Out_Line = Right(L_Date,8) Right(L_Time,6) Right(L_Size,8) L_Spec ,
  435.                   Fill"(Wrong Level)"
  436.        Call Log_Output
  437.      end
  438. Return
  439.  
  440. /*----------------------------------------------------------------------*
  441.  * When low a file is missing locally                                   *
  442.  *----------------------------------------------------------------------*/
  443. Error_Low:
  444.   If Sync_IMAGE   /* If Sunc the CORE disk via NFS          ATH  8/12/92 */
  445.      Then Call Download New    /* Copy data from Master    ATH  8/12/92 */
  446.      Else Do     /* Show the error                         ATH  8/12/92 */
  447.        Missing_Ct = Missing_Ct + 1
  448.        Fill_Ct = 30 - Length(L_Spec)
  449.        If Fill_Ct < 0 then Fill = ""; else Fill = Left(" ",Fill_Ct)
  450.        Out_Line = Right(L_Date,8) Right(L_Time,6) Right(L_Size,8) L_Spec ,
  451.                   Fill"(Does not Exist)"
  452.        Call Log_Output
  453.      end
  454. Return
  455.  
  456. /*----------------------------------------------------------------------*
  457.  * When high a file or dir may need be erased locally                   *
  458.  *----------------------------------------------------------------------*/
  459. Error_High:
  460.   Log_Msg = ""               /* Reset Log Message          ATH 11/13/92 */
  461.   If Substr(D_Att,2,1) = 'D' /* Is this a directory entry? ATH 11/13/92 */
  462.     Then Do                  /* Yes - Directory            ATH 11/13/92 */
  463.       L_List = Translate(L_Path, ' ', '\')  /* List Path   ATH 11/13/92 */
  464.       D_List = Translate(D_Spec, ' ', '\')  /* Disk Path   ATH 11/13/92 */
  465. /* Say 'List Spec =' L_Spec
  466.    Say 'List Dir. =' L_List
  467.    Say 'Disk Dir. =' D_List */
  468.       Do I1 = 1 to Words(D_List) /* Compare directory tree ATH 11/13/92 */
  469. /* Say 'Index' I1 'L_Dir "'Word(L_List, I1)'" D_Dir "'Word(D_list, I1)'"' */
  470.          If Word(L_List, I1) <> Word(D_list, I1) /* Same?  ATH 11/13/92 */
  471.             Then Do /* Queue the directory to be erased.   ATH 11/13/92 */
  472.               Dir_I = Dir_List.0 + 1             /* + 1    ATH 11/13/92 */
  473.               /* Remove the trailing '/' from the directory name        */
  474.               Dir_List.Dir_I = D_Date D_Time D_Size ,   /* ATH 11/13/92 */
  475.                 CORE_Dir || Left(D_Spec, Length(D_Spec)-1) /*  11/13/92 */
  476.               Dir_List.0 = Dir_I        /* Remember count  ATH 11/13/92 */
  477. /* Say 'Queue' Dir_I '=' Dir_List.Dir_I
  478.    Say */
  479.               Leave I1  /* Exit the loop                   ATH 11/13/92 */
  480.             end
  481.       end
  482.     end                                                 /* ATH 11/13/92 */
  483.     Else Do                  /* No  - File                 ATH 11/13/92 */
  484.       Log_Msg = ""           /* Reset Log Message          ATH 11/13/92 */
  485.       If Erase_old           /* Should we Erase the file? */
  486.          Then Do             /* Yes - Erase file */
  487.            If Ask_User
  488.               Then Do
  489.                 Say
  490.                 Call RxSay "Do you want to Erase" CORE_Dir || D_Spec " (Y/N): "
  491.                 Resp = Translate(RxGetKey())
  492.                 Say
  493.               end
  494.               Else Resp = "Y"
  495.            If Resp = 'Y'
  496.               Then Do
  497.                 File_Spec = CORE_Dir || D_Spec
  498.                 If Substr(D_Att,4,1) = "R"  /* If Read only flip the bit */
  499.                    Then Call RxTree File_Spec, 'Temp', 'F', '*****', '***-*'
  500.                 'Erase "'File_Spec'"'
  501.                 If RC = 0 Then Log_Msg = "(Erased)"
  502.                           Else Do
  503.                             Log_Msg = "(Erase RC =" RC")"
  504.                             Erase_Ct = Erase_Ct + 1
  505.                           end
  506.               end
  507.          end
  508.       If Log_Msg = "" Then Do    /* If not erased, tell user */
  509.          Erase_Ct = Erase_Ct + 1
  510.          Log_Msg = "(Should be Erased)"
  511.          end
  512.       Fill_Ct = 30 - Length(D_Spec)
  513.       If Fill_Ct < 0 then Fill = ""; else Fill = Left(" ",Fill_Ct)
  514.       Out_Line = Right(D_Date,8) Right(D_Time,6) Right(D_Size,8) D_Spec ,
  515.                  Fill || Log_Msg
  516.       Call Log_Output
  517.     end
  518. Return
  519.  
  520. /*----------------------------------------------------------------------*/
  521. Download:                                               /* ATH  8/12/92 */
  522.   Parse Arg Flag    . /* Get the Replace Flag              ATH  8/12/92 */
  523. /* Remove code ...                                         ATH 11/13/92
  524.   L_In = lastpos('\', L_Spec)   /* Split path & filename   ATH  8/12/92 */
  525.   L_Path = Left(L_Spec,L_In)    /* Full Path if any        ATH 11/13/92 */
  526.   L_FN = Substr(L_Spec,L_In+1)  /* Filename.Ext            ATH  8/12/92 */
  527. ... End of removed code                                    ATH 11/13/92 */
  528.   Temp_Spec   = CORE_dir||L_Path||Temp_File             /* ATH 11/13/92 */
  529.   Master_File = Master_CORE||L_Spec                     /* ATH  8/12/92 */
  530.   L_File_Spec = CORE_Dir || L_Spec                      /* ATH  9/25/92 */
  531.   Retry_Copy_Ct = 0           /* Reset the retry count     ATH  9/25/92 */
  532.   Do Until Retry_Copy = 0     /* Loop if the flag is set   ATH  8/12/92 */
  533.     Retry_Copy = 0            /* Reset the loop flag       ATH  8/12/92 */
  534.     "ECHO NO | XCOPY" Master_File Temp_Spec '>nul 2>&1'    /*  10/29/92 */
  535.     XRC = RC                 /* Save the XCopy RC          ATH 10/06/92 */
  536.  
  537.     If XRC = 0  /* Any errors from XCopy?                  ATH  8/12/92 */
  538.        Then Do  /* No - Then rename the temp file.         ATH  8/12/92 */
  539.          /* Check the Date time and size of the copied file to see if   */
  540.          /* it realy did copy ok.                          ATH 10/06/92 */
  541.          Call RxTree Temp_Spec, 'Temp', 'F' /* Did it copy ATH 10/06/92 */
  542.          If Temp.0 <> 1 Then XRC = 98       /* No - error  ATH 10/06/92 */
  543.             Else Do  /* Yes- check Date time and size.     ATH 10/06/92 */
  544.               Parse Upper Var Temp.1 T_Date T_Time T_Size T_Att T_Spec
  545.               If T_Date <> L_Date | T_Time <> L_Time | T_Size <> L_Size
  546.                  Then XRC = 99 /* Error if D/T/Size not =  ATH 10/06/92 */
  547.             end
  548.        end                                              /* ATH  8/12/92 */
  549.  
  550.     /* XRC will be the RC from XEdit or Error 98 or 99 from above.      */
  551.     If XRC = 0 & Flag = Rep  /* Replacing a file?          ATH 10/16/92 */
  552.        Then Do               /* Yes - Erase the old one.   ATH 10/06/92 */
  553.          If Substr(D_Att,4,1) = "R" /* If Read only flip the bit */
  554.             Then Call RxTree L_File_Spec, 'Temp', 'F', '*****', '***-*'
  555.          'Erase' L_File_Spec  /* Erase the old file        ATH 10/16/92 */
  556.          If RC <> 0 Then do /* If Error Erasing file ...   ATH 10/16/92 */
  557.             ERC = RC   /* then save the Return Code & ...  ATH 10/16/92 */
  558.             XRC = 97   /* set the Replace Error Code.      ATH 10/16/92 */
  559.             If Net_Close  /* If NetClose option ...        ATH 10/16/92 */
  560.                Then Do  /* then force the file closed.     ATH 10/16/92 */
  561.                  NetClose NC_Path||L_Spec /* Close file.   ATH 10/16/92 */
  562.                  'Erase' L_File_Spec      /* Erase again.  ATH 10/16/92 */
  563.                  If RC = 0 then XRC = 0 /* Reset RC if ok. ATH 10/16/92 */
  564.                end                                      /* ATH 10/16/92 */
  565.          end                                            /* ATH 10/16/92 */
  566.        end                                              /* ATH  8/12/92 */
  567.  
  568.     If XRC = 0   /* XRC may be reset from the Erase above  ATH 10/16/92 */
  569.        Then Do   /* If no Errors at all from above.        ATH 10/16/92 */
  570.          'Rename' Temp_Spec L_FN  /* Back to Original Name ATH  8/12/92 */
  571.           XRC = RC         /* Save the return Code         ATH 10/16/92 */
  572.        end                                              /* ATH 10/16/92 */
  573.  
  574.     If XRC = 0  /* XRC may be reset from the Rename above  ATH 10/16/92 */
  575.        Then Do  /* If no Errors at all from above.         ATH 10/16/92 */
  576.          Download_Msg = '(Copied)'        /* Log change    ATH 10/16/92 */
  577.          Copied_Ct = Copied_Ct + 1        /* Count copies  ATH 10/16/92 */
  578.        end                                              /* ATH  8/12/92 */
  579.        Else Do  /* If any Errors at all from above         ATH 10/16/92 */
  580.          If RxFileExist(Temp_Spec) /* If file exists       ATH  8/12/92 */
  581.             Then 'Erase' Temp_Spec /*    erase it.         ATH  8/12/92 */
  582.          If L_In > 0     /* Is the length of path > 0?     ATH  8/12/92 */
  583.             Then do      /* If there is a path             ATH  8/12/92 */
  584.               Test_Path = CORE_dir||left(L_Path, L_In-1)/* ATH 11/13/92 */
  585.               If \RxDirExist(Test_Path)    /* Any Dir?     ATH  8/12/92 */
  586.                  Then Do                   /* No, Make one ATH  8/12/92 */
  587.                    RC = RxMkDir(Test_Path) /* Make the dir ATH  8/12/92 */
  588.                    If RC = 0  /* If ok set the flag        ATH  8/12/92 */
  589.                       Then Retry_Copy = 1  /* Retry copy   ATH  8/12/92 */
  590.                  end                                   /*  ATH  8/12/92 */
  591.             end                                         /* ATH  9/25/92 */
  592.          /* Retry_Copy will be 0 unless a directory was created above.  */
  593.          If Retry_Copy = 0  /* Count error if no retry     ATH  8/12/92 */
  594.             Then Do         /* Retry the operation         ATH  9/25/92 */
  595.               If Retry_Copy_Ct < Retry_Count            /* ATH  9/25/92 */
  596.                  Then Do                                /* ATH  9/25/92 */
  597.                    Retry_Copy_Ct = Retry_Copy_Ct + 1    /* ATH  9/25/92 */
  598.                    Retry_Copy = 1     /* Retry the copy    ATH  9/25/92 */
  599.                    Say '  Error RC = "'XRC'".  Retrying "'L_File_Spec'".'
  600.                  end
  601.                  Else Do                                /* ATH  9/25/92 */
  602.                    Download_Ct = Download_Ct + 1        /* ATH  9/25/92 */
  603.                    Select /* Set the error message         ATH 10/06/92 */
  604.                      When XRC = 97
  605.                           Then Download_Msg = '(Replace RC =' ERC')'
  606.                      When XRC = 98
  607.                           Then Download_Msg = '(Not Copied)'
  608.                      When XRC = 99
  609.                           Then Download_Msg = '(Copied Level Wrong)'
  610.                      Otherwise Download_Msg = '(XCopy RC =' XRC')'
  611.                    end                                  /* ATH 10/16/92 */
  612.                  end                                    /* ATH 10/16/92 */
  613.             end                                         /* ATH 10/16/92 */
  614.        end                                              /* ATH 10/16/92 */
  615.   end                                                   /* ATH 10/16/92 */
  616.   Fill_Ct = 30 - Length(L_Spec)                         /* ATH  8/12/92 */
  617.   If Fill_Ct < 0 then Fill = ""; else Fill = Left(" ",Fill_Ct)
  618.   Out_Line = Right(L_Date,8) Right(L_Time,6) Right(L_Size,8) L_Spec ,
  619.              Fill || Download_Msg                       /* ATH  8/12/92 */
  620.   Call Log_Output                                       /* ATH  8/12/92 */
  621. Return                                                  /* ATH  8/12/92 */
  622.  
  623. /*----------------------------------------------------------------------*/
  624. Log_Output:
  625.   Say Out_Line
  626.   Call LineOut Output_File, Out_Line
  627.   If Result = 1 then Signal Write_Err
  628. Return
  629.  
  630. /*----------------------------------------------------------------------*/
  631. Set_Msg:
  632.   Send_Msg = 1
  633.   Parse var etc Msg_Name etc
  634.   If Msg_Name = "" Then Do
  635.      Say "Name required after the Message option."
  636.      Call Exit_RC 1                                     /* ATH 10/16/92 */
  637.      End
  638. Return
  639.  
  640. /*----------------------------------------------------------------------*/
  641. Time_Stamp:
  642.   TS_Last = TS_This
  643.   TS_This = Time('E')
  644.   TS_Diff = (TS_This - TS_last)
  645. Return Time() '('Format(TS_Diff,4,2) Format(TS_This,4,2)')'
  646.  
  647. /*----------------------------------------------------------------------*/
  648. Read_Err:
  649.    Say "Error Reading the Input file."
  650.    Call Exit_RC 2                                       /* ATH 10/16/92 */
  651.  
  652. /*----------------------------------------------------------------------*/
  653. Write_Err:
  654.    Say "Error Writing the Output file."
  655.    Call Exit_RC 2                                       /* ATH 10/16/92 */
  656.  
  657. /*----------------------------------------------------------------------*/
  658. Erase_File:
  659.    Parse Arg Erase_File
  660.    If Stream(Erase_File,'c','query exists') <> ""
  661.       Then "Erase" Erase_File         /* Erase the file if it exists. */
  662. Return
  663.  
  664. /*----------------------------------------------------------------------*/
  665. Exit_RC:                                                 /* ATH 10/16/92 */
  666.   Parse Var Ret_Code .                                   /* ATH 10/16/92 */
  667.   If Send_Msg & Ret_Code <> 0 Then Do /* Notify on Error    ATH 10/16/92 */
  668.      If Error_Ct <> 1 Then s = 's'; else s = ''          /* ATH 10/16/92 */
  669.      /* 'Call W:\Notify.Cmd .' CMD_Name Ret_Code Msg_Name  ,ATH 10/16/92 */
  670.      /* Error_Ct 'Error's' found in the' Core_Dir 'directory.'  10/16/92 */
  671.      'Call Notify . ' CMD_Name Ret_Code 'CORE' Error_Ct ,/* DSK 10/16/92 */
  672.      'Error's' found in the' Core_Dir 'directory.'       /* DSK 10/16/92 */
  673.   end                                                    /* ATH 10/16/92 */
  674. Exit Ret_Code                                            /* ATH 10/16/92 */
  675.  
  676. /*----------------------------------------------------------------------*/
  677. Help:
  678. cls
  679. Say ''
  680. Say 'VerImage will read the' Target_File 'and verify that all of the files listed'
  681. Say 'in it are on the NetDoor disk.  Any inconsistencies will be logged into the'
  682. Say Output_File 'file in the current directory. '
  683. Say ''
  684. Say 'VERIMAGE ─ NetDoorDir ─┬─────────────────┬───┬───────────────────┬──┤'
  685. Say '                       ├ /New ───────────┤   ├ /Sync Source_Dir ─┤   '
  686. Say '                       ├ /Erase ─────────┤   ├ /NETClose path ───┤   '
  687. Say '                       ├ /Yes ───────────┤   ├ /Retry nn ────────┤   '
  688. Say '                       ├ /LIst ──────────┤   ├ /LOg file_spec ───┤   '
  689. Say '                       ├ /Message name ──┤   └──────────────────┘   '
  690. Say '                       └────────────────┘ '
  691. Say ''
  692. Say 'Where: "NetDoorDir" is the path to the local NetDoor disk to be verified.'
  693. Say '       For example: "W:\" or "D:\COUIMAGE\"'
  694. Say ''
  695. Say 'Files found in the "Local" or "WasteBin" directories will be skipped as these'
  696. Say 'files are normally unique to the local site.  When a file in the "NetDoorDir"'
  697. Say 'is replaced or erased and the Read only bit is on it will be turned off and '
  698. Say 'turned back on for the replacement file.'
  699. Say ''
  700. If \Abbrev("HELP", CORE_Dir, 1)
  701.    Then Do
  702.         Say '           (Enter "'CMD_Name 'Help" for more details and examples.)'
  703.         Exit;
  704.         End
  705.    Else Do
  706.         Call CharOut ,'                     (Press the "Enter" key to continue)'
  707.         A = CharIn(,,2)
  708.         End
  709. "CLS"
  710. Say 'Options:        (Characters in upper case are the minimum required.)'
  711. Say ''
  712. Say '       /New     Will erase the "'Output_File'" file before running the program.'
  713. Say '       /Erase   Will remove empty directories and ask the user if he wants to '
  714. Say '                erase any files found in the "NetDoorDir" that are not listed in'
  715. Say '                the "'Target_File'" file.'
  716. Say '       /Yes     Will not ask for verification when erasing files.'
  717. Say '       /Sync Source_Dir  Will use the Source_Dir as the master NetDoor disk and '
  718. Say '                synchronize the local NetDoor to it.  Normally the Source_Dir'
  719. Say '                is the "D:\World" directory on the NFS mounted "YKTUP01" disk'
  720. Say '                from Yorktown.  (See NFS Note below)'
  721. Say '       /Retry nn         The retry count for copy errors when synchronizing.'
  722. Say '                nn = "'Retry_Count'" by default.'
  723. Say '       /NETClose path    Will call the NetClose command to close locked file'
  724. Say '                when using the "/Sync" option.  The "path" must be in the form'
  725. Say '                required by the NetClose command.  i.e. "\\Server\Alias\Path"'
  726. Say '                or "d:\Path" where "d:" is a network drive, NOT a LOCAL drive.'
  727. Say '       /Message name     Will use the Notify command to send an error message'
  728. Say '                to the Notify name specified by Name. (See Notify.Cmd)'
  729. Say '       /LIst    Create a "'Target_File'" file on the "Source_Dir" from the'
  730. Say '                files currently on the disk.  Used on the NetDoor Master only. '
  731. Say '       /LOg file_spec    Will change the name of the log file "'Output_File'"'
  732. Say '                to the name specified by "file_spec".'
  733. Say ''
  734. Call CharOut ,'                     (Press the "Enter" key to continue)'
  735. A = CharIn(,,2)
  736. "CLS"
  737. Say 'NFS Note: If you are in a different time zone then Yorktown than the "NFSC" '
  738. Say '          Daemon will adjust the date and time of files copied to the local '
  739. Say '          date and time.  To get around this set the "TZ" environmental     '
  740. Say '          variable to the Yorktown time zone before starting "NFSC".  Then   '
  741. Say '          set the variable back to your local time. '
  742. Say ''
  743. Say ' The following example will start the NFS Client with the Yorktown time zone,'
  744. Say ' mount the master NetDoor disk and run VerImage to synchronize the local NetDoor'
  745. Say ' disk with a master isk.'
  746. Say ''
  747. Say '           "SET TZ=EST5EDT"          (East cost time zone.)'
  748. Say '           "NFSC"                    (Start the NFS Client.)'
  749. Say '           "SET TZ=PST8PDT"          (If you are on the west cost.)'
  750. Say '           "Mount -u2 -g2 X: YKTUP01.watson.ibm.com D:\World" '
  751. Say '            (You must be authorized to Mount the NetDoor source disk.)'
  752. Say '           "VerImage W:\ /Sync X:\ /NETClose W:\ /Erase /Yes"'
  753. Say ''
  754. Say ' To verify your Local NetDoor system and be prompted to erase any old file that '
  755. Say ' are no longer needed, enter the following command.'
  756. Say ''
  757. Say '           "VerImage W:\ /Erase"'
  758. Say ''
  759. Call CharOut ,'                     (Press the "Enter" key to continue)'
  760. A = CharIn(,,2)
  761. "CLS"
  762. Say 'Sample VerImage.Log file entries and error conditions:'
  763. Say ''
  764. Say '11/14/91  9:31A      268 ADMTOOLS\SYNCSERV.CMD          (Wrong Level)'
  765. Say '          The file listed above (from "'Target_File'") has a different date'
  766. Say '          time or size then the file found in the local "NetDoorDir".'
  767. Say '          Use the "/Sync" option to download the file.'
  768. Say ''
  769. Say ' 4/03/92  2:59P     2294 TCPIPR0\BIN\XINIT.CMD          (Does not Exist)'
  770. Say '          The file listed above (from "'Target_File'") was not found in the'
  771. Say '          local "NetDoorDir".  Use the "/Sync" option to download the file.'
  772. Say ''
  773. Say ' 3/10/92  4:55P       88 ADMTOOLS\REBOOT\NOTIFY.LOG     (Should be Erased)'
  774. Say '          The file listed above was found in the local "NetDoorDir" but is not'
  775. Say '          listed in the "'Target_File'" file.  Use the "/Erase" option to'
  776. Say '          erase the file from the local "NetDoorDir".'
  777. Say ''
  778. Say ' 3/10/92  4:55P       88 ADMTOOLS\REBOOT\NOTIFY.LOG     (Erased)'
  779. Say '          The file listed above was erased from the local "NetDoorDir".'
  780. Say ''
  781. Say ' 3/10/92  4:55P       88 ADMTOOLS\REBOOT\NOTIFY.LOG     (Erase RC = 1 )'
  782. Say '          When attempting to erase the file listed above a non 0 return code'
  783. Say '          was returned by the erase command and the file was not erased.'
  784. Say ''
  785. Call CharOut ,'                     (Press the "Enter" key to continue)'
  786. A = CharIn(,,2)
  787. "CLS"
  788. Say 'Sample VerImage.Log file entries and error conditions for directories:'
  789. Say ''
  790. Say ' 7/21/92  1:42P      Dir W:\ADMTOOLS\UTIL                (Should be removed)'
  791. Say '          The directory listed above is empty and should be removed from the'
  792. Say '          local "NetDoor".  Use the "/Erase" option to remove the directory'
  793. Say '          from the local "NetDoorDir".'
  794. Say ''
  795. Say ' 7/21/92  1:42P      Dir W:\ADMTOOLS\UTIL                (Removed)'
  796. Say '          The directory listed above was removed from the local "NetDoorDir".'
  797. Say ''
  798. Say ' 7/21/92  1:42P      Dir W:\ADMTOOLS\UTIL                (RmDir RC = 1 )'
  799. Say '          When attempting to remove the directory listed above a non 0 return'
  800. Say '          code was returned by the "RmDir" command and the directory was not'
  801. Say '          removed.'
  802. Say ''
  803. Call CharOut ,'                     (Press the "Enter" key to continue)'
  804. A = CharIn(,,2)
  805. "CLS"
  806. Say 'Sample VerImage.Log file entries and error conditions using the "/Sync" Option:'
  807. Say ''
  808. Say ' 8/06/92 11:19A     7122 ADMTOOLS\VERIMAGE.CMD           (Copied)'
  809. Say '          The file listed above was successfully copied (downloaded) from the'
  810. Say '          "Source_Dir" specified on the "/Sync" option to the local "NetDoorDir".'
  811. Say ''
  812. Say ' 6/04/91  1:31P        0 PMCAL\TIMEXEC.RMD              (Not Copied)'
  813. Say '          XCopy returned a return code of 0 but the file was not copied.'
  814. Say ''
  815. Say ' 6/04/91  1:31P        0 PMCAL\TIMEXEC.RMD              (Copied Level Wrong)'
  816. Say '          XCopy returned a return code of 0 but the copied file had a'
  817. Say '          different Date, Time or Size then the file listed above.'
  818. Say ''
  819. Say ' 8/06/92 11:16A     7122 ADMTOOLS\VERIMAGE.CMD           (XCopy RC = 1)'
  820. Say '          A non 0 return code was returned by the "XCopy" command when'
  821. Say '          attempting to downloaded the file listed above.'
  822. Say ''
  823. Say ' 3/20/92  1:57P    85504 DLL\RXUTILS.DLL                (Replace RC = 1)'
  824. Say '          The "Erase" command returned the non 0 return code a when attempting'
  825. Say '          to replace the file listed above.  The original file may be locked.'
  826. Say '          Try using the "/NETClose" option to force the file closed.'
  827. Say ''
  828. Call CharOut ,'                     (Press the "Enter" key to continue)'
  829. A = CharIn(,,2)
  830. "CLS"
  831. Say ''
  832. Say ' For all error conditions using the "/Sync" option, the original file will'
  833. Say ' remain unchanged in the local "NetDoorDir".  These errors may be caused by:'
  834. Say
  835. Say ' *  A transmission error when using the TCP/IP Network File System.'
  836. Say
  837. Say ' *  The file on the local "NetDoorDir" may be locked. Try using the "/NETClose"'
  838. Say '    option to force the file closed.'
  839. Say
  840. Say ' *  The "/NETClose" option specified a local drive, not a network drive.'
  841. Say
  842. Say ' *  The file on the local "NetDoorDir" is locked by a local application'
  843. Say '    running on the server.  The application locking the file must release'
  844. Say '    it before it can be replaced.  Try stopping the application on the server.'
  845. Say
  846. Say ' *  A file was replace on the "Source_Dir" after the "'Target_File'" file'
  847. Say '    was updated.'
  848.  
  849. Exit
  850.