home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / wsgatsam.zip / install / WSGWinstallJDBC.bat < prev    next >
DOS Batch File  |  2003-02-24  |  2KB  |  67 lines

  1. @title Creating JDBC Provider - IBM WebServices Gateway
  2.  
  3. @rem parameters are 1=WebServices Gateway install directory (typically C:\WebSphere\WSGW)
  4. @rem                2=WebSphere node name
  5. @rem                3=WebSphere AppServer directory (typically C:\WebSphere\AppServer)
  6. @rem                4=DB2 install directory (e.g. C:\PROGRA~1\SQLLIB) 
  7.  
  8. @if .%1==. goto invalidparams
  9. @if .%2==. goto invalidparams
  10. @if .%3==. goto invalidparams
  11. @if .%4==. goto invalidparams
  12.  
  13. @rem Check parameter 1 is a valid directory.
  14. @if EXIST %1 goto goodparam1
  15. @echo The directory %1 specified for Gateway install directory does not exist.
  16. @goto invalidparams
  17.  
  18. @rem Check parameter 3 is a valid directory.
  19. :goodparam1
  20. @if EXIST %3 goto goodparam2
  21. @echo The directory %3 specified for WebSphere AppServer directory does not exist.
  22. @goto invalidparams
  23.  
  24. @rem Check parameter 4 is a valid directory.
  25. :goodparam2
  26. @if EXIST %4 goto goodparam3
  27. @echo The directory %4 specified for DB2 install directory does not exist.
  28. @goto invalidparams
  29.  
  30. @rem Check parameter 4 points to the right place.
  31. :goodparam3
  32. @if EXIST %4\java\db2java.zip goto goodparams
  33. @echo The file %4\java\db2java.zip does not exist.
  34. @goto invalidparams
  35.  
  36. @rem Parameters are good.
  37. :goodparams
  38. @echo The WebSphere Admin Server will be started (if it is not already running)
  39. @echo Any existing WebServices Gateway application will be stopped and removed from WebSphere
  40. @echo The WebServices Gateway JDBC driver will be installed
  41. @echo.
  42. @echo There may be a slight delay while the Admin Server is started
  43. @call %1\install\installJDBC.bat %1 %2 %3 %4 > %3\logs\WSGWinstallJDBC.log 2>&1
  44.  
  45. @if errorlevel 0 goto InstallWorked
  46. @if %errorlevel% leq 0 goto InstallWorked
  47.  
  48. @echo.
  49. @echo Warning: an error might have occurred during the installation of the WebServices Gateway.
  50. @echo Please check the WSGWinstallJDBC.log file in the \logs subdirectory 
  51. @echo of the WebServices Gateway install directory.
  52. @echo.
  53. @goto :eof
  54.  
  55. :InstallWorked
  56. @echo The WebServices Gateway JDBC driver has been installed
  57.  
  58. @goto :eof
  59.  
  60. :invalidparams
  61. @echo This command file requires 4 parameters
  62. @echo Parameters are 1=WebServices Gateway install directory (typically C:\WebSphere\WSGW)
  63. @echo                2=WebSphere node name
  64. @echo                3=WebSphere AppServer directory (typically C:\WebSphere\AppServer)
  65. @echo                4=DB2 install directory (e.g. C:\PROGRA~1\SQLLIB) 
  66.  
  67.