home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / tblcp2.zip / tblcop2.CMD next >
OS/2 REXX Batch file  |  1993-10-28  |  722b  |  40 lines

  1. /* Rexx */
  2.  
  3. fromdb = 'sample'
  4.  
  5. cmdstr = "return dbm('alter table new_col_list primary key(name,tbname,tbcreator)')"
  6. /*cmdstr = ''*/
  7.  
  8. lituid = 'userid'
  9. litpw  = 'password'
  10. litlu  = '*'
  11. littab = 'sysibm.syscolumns'
  12. commitfreq = 100
  13.  
  14. s.0 = 1
  15.  
  16. s.1.1  = litlu
  17. s.1.2  = 'sample'
  18. s.1.3  = 'new_col_list'
  19. s.1.4  = lituid
  20. s.1.5  = litpw
  21. s.1.6  = 'replace'
  22. s.1.7  = 'reject'
  23. s.1.8  = 'y'
  24. s.1.9  = 'y'
  25. s.1.10 = ''
  26. s.1.11 = cmdstr
  27.  
  28. ss = 'select * from' littab 'for fetch only'
  29.  
  30. If rxfuncquery('tcopy') then
  31.   call rxfuncadd 'tcopy','tblcop2e','tblcop2e'
  32.  
  33. say tcopy(fromdb,ss,'s.',lituid,litpw,commitfreq)
  34. Do i=1 to s.0
  35.   Say;Say 'Result from partner #'i'('s.i.1'/'s.i.2'):'
  36.   Say s.i
  37. End
  38.  
  39. Exit
  40.