home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rexxgdb2.zip / BindGDB2.CMD next >
OS/2 REXX Batch file  |  1997-08-10  |  1KB  |  46 lines

  1. /* rexx */
  2. '@echo off'
  3.  
  4. do forever
  5.    'cls'
  6.    say
  7.    say 'BindGDB2 --- Create a REXXGDB2 package on your database(s)'
  8.    say 'Copyright (C) 1995-1997 Global Automation Co.'
  9.    say 'All Rights Reserved'
  10.    say
  11.    say 'Please enter the database you want to bind to REXXGDB2 below,'
  12.    say 'then press Enter.'
  13.    say
  14.    say 'Just press Enter (without entering anything) to quit.'
  15.    say
  16.    say 'Database to be bound to REXXGDB2:'
  17.    pull dbn
  18.    dbn = strip(dbn)
  19.    if dbn = '' then
  20.       leave
  21.    say
  22.    say 'Connecting to database' dbn'...'
  23.    'DB2 CONNECT TO' dbn 'IN SHARE MODE'
  24.    if rc = 0 then do
  25.       say 'Creating a package for REXXGDB2 in' dbn'...'
  26.       say '(this may take a minute to complete)'
  27.       "DB2 BIND REXXGDB2.BND QUERYOPT 9"
  28.       end
  29.    say
  30.    if rc = 0 then
  31.       say dbn 'has successfully bound & can now be accessed w/ G2 functions...'
  32.    else
  33.       say 'Bind process failed w/ RC =' rc''
  34.    say
  35.    'pause'
  36.    end
  37.  
  38. say 'Thank you for your interests in REXX, DB2, and OS/2 Warp!'
  39. say 'Many thanks for your considerations in using the REXXGDB2 package!'
  40. say
  41. say 'Simon Husin'
  42. say 'Kent, Washington, U.S.A.'
  43. say 'August 1997'
  44. say 'E-mail: husin@ibm.net'
  45. return 0
  46.