home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / wsa5labs.zip / BankDataSetup.bat next >
DOS Batch File  |  2002-10-08  |  3KB  |  76 lines

  1. REM     
  2. REM         5630-A23, 5630-A22, (C) Copyright IBM Corporation, 2002
  3. REM         All rights reserved. Licensed Materials Property of IBM
  4. REM         Note to US Government users: Documentation related to restricted rights
  5. REM         Use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule with IBM Corp.
  6. REM         This page may contain other proprietary notices and copyright information, the terms of which must be observed and followed.
  7. REM        
  8. REM         This program may be used, executed, copied, modified and distributed
  9. REM         without royalty for the purpose of developing, using,
  10. REM         marketing, or distributing.
  11. REM        
  12. REM       
  13. @echo off
  14. call C:\EELabFiles50\setupVARs.bat
  15. title Loading database - Create and Populate database BankData
  16.  
  17. rem invoke db2 command line and run loadDataBase script
  18.  
  19. rem parameters are:
  20. rem                1=db2 userid 
  21. rem                2=db2 password
  22. rem                3=Table.ddl file
  23.  
  24. cls
  25. echo.
  26. echo ****************************************************************
  27. echo  ***************************** ********************************
  28. echo   ***************************   ******************************
  29. echo    *************************     ****************************
  30. echo     ***********************       **************************
  31. echo      *********************         ************************
  32. echo       *******************           **********************
  33. echo.
  34. echo          About to drop the tables ACCOUNT and CUSTOMER
  35. echo                in the database called BankData!
  36. echo.
  37. echo          Hit Ctrl-C now to abort this action
  38. echo               if you do not wish this to happen.
  39. echo.
  40. echo       *******************           **********************
  41. echo      *********************         ************************
  42. echo     ***********************       **************************
  43. echo    *************************     ****************************
  44. echo   ***************************   ******************************
  45. echo  ***************************** ********************************
  46. echo ****************************************************************
  47.  
  48. pause
  49.  
  50. db2start
  51.  
  52. call C:\EElabfiles50\CreateBankData.bat %1 %2 %3 > BankDataLoadDB.log 2>&1
  53. if errorlevel 1 goto LoadFailed
  54.  
  55. echo.
  56. echo BankData database has been created and loaded
  57. goto exit
  58.  
  59. :LoadFailed
  60. cls
  61. echo. 
  62. echo.
  63. echo Warning: the BankData database for this Lab has experienced a problem
  64. echo Try looking at the BankDataLoadDB.log file in the \logs subdirectory 
  65. echo.
  66. echo.
  67. echo.
  68. echo Parameters are: 
  69. echo                1=Db2 userid
  70. echo                2=DB2 password
  71. echo                3=Table.ddl file
  72. pause
  73.  
  74. :exit
  75. rem @popd
  76. title Command Prompt