anchor.diff:  :: END OF SCRIPT    ::
   ::------------------::
   :debug
  +    setlocal EnableDelayedExpansion
       set foundfile=""
  +    call:getFilePath perl.exe foundfile
  +    echo perl.exe!foundfile!
  +    call:getFilePath nofile.exe foundfile
  +    echo nofile.exe !foundfile!
       call:getFilePath mysql.exe Server foundfile
  -    echo !foundfile!
  -    call:getFilePath perl.exe foundfile
  -    echo !foundfile!
  +    echo mysql.exe!foundfile!
       call:getFilePath "C:\SnomedCT_ReleaseFiles\SnomedCT_InternationalRF2_PRODUCTION_20190731T120000Z%\Snapshot\Terminology\sct2_Relationship..." "Snapshot" foundfile
  -    echo !foundfile!
  +    echo snap_rels !foundfile!
  +    endlocal
   exit /b
positive.code: 
  :: This section does the substitutions for the three placeholders in templace SQL script
  :: Additional placeholders could be added if required using additional set line statement with a similar
  :: The process is a little obscure using findstr with /v (not matching) and and impossible match
  :: string. This is because simpler options fail to include blank lines (which are needed in some places) 
  :: In each case: 
  ::     %phXXXX% variable holds the placeholder text 
  ::     %xxxx%   variable hold the replacement text collected from user input
  :: NOTE: Fullstop after echo. is essential in: >>"!sql_tmp!" echo. !line!
  ::       without this blank lines in the template get replaced by "ECHO is off" (not valid in SQL!)
  
  
  type "!sql_file!" > "!sql_file!.tmp"
   >"!sql_tmp!" echo.-- Generated SQL Load Script (Windows) --
  set nomatch="^ZzZQqQZzZqQq$"
  for /f "tokens=1* delims=:" %%A in ('findstr /n /v %nomatch% "!sql_file!.tmp"') do (
      setlocal EnableDelayedExpansion
      set line=%%B
      if not !line!a==a (
          set "line=!line:%phRelpath%=%thisReleaseSql%!"
          set "line=!line:%phDbname%=%dbname%!"
          set "line=!line:%phReldate%=%thisReldate%!"
          >>"!sql_tmp!" echo.!line!
      ) else (
          >>"!sql_tmp!" echo.
      )
      endlocal
      )
  echo off
  del /f "!sql_file!.tmp"
  :: End of MySQL Script generation from template
  
  :: Run the MySQL import process
  
negative.code: set "phDbname=$DBNAME"
  set "phReldate=$RELDATE"
  
  :: Establish the location of Perl executables
  call:printf "\nChecking for required software Perl and MySQL Server"
  call:printLog "Checking for required software Perl and MySQL Server"
  set perlpath=""
  call:getFilePath perl.exe perlpath
  :: Report error is no perl.exe is found.
  if "!perlpath!"=="NOT FOUND" (
      call:printLog "Unable to find perl.exe"
      call:printf "\nUnable to find perl.exe - Cannot build transitive closure table file.\n\tPlease install Strawberry Perl (http://strawberryperl.com/) and then retry"
      exit /b 1
  )
  call:printf "\nPERL Processor Found !perlpath!"
  call:printLog "PERL Processor Found !perlpath!"
  :: Establish the location of MySQL Sever executables
  set mysqlPath=""
  call:getFilePath mysql.exe Server mysqlPath
  if "!mysqlPath!"=="NOT FOUND" (
      call:printLog "Unable to find mysql.exe"
      call:printf "\nUnable to find mysql.exe - Cannot import the data.\n\tPlease install MySQL Community Server and Workbench\n\t(https://dev.mysql.com/downloads/mysql/).\n\tThen configure in line with SnomedRfsMySql recommendations\n\tbefore retrying this import process".
      exit /b 1
  )
  call:printf "\nMySQL Path: !mysqlPath!"
  call:printLog "MySQL Path: !mysqlPath!"
  
  :: Get Release Path
  call:printf "\nEnter the full path to the SNOMED CT Release Package folder or zip archive"
  set /P thisRelease="Release folder or zip archive path? "
  
  :: Get valid Unix style version of thisRelease for use in SQL
  