home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / sqlcla.zip / DESCRIBE.CMD next >
OS/2 REXX Batch file  |  1993-07-14  |  637b  |  18 lines

  1. /* (C) Copyright Stephen B. Behman, 1993 -- All rights reserved. */
  2. /* $Header: h:/ubin/RCS/describe.cmd 2.0 93/07/14 10:09:25 Steve Exp $ */
  3. '@echo off'
  4. parse upper arg dbname    tbnam
  5. tbnam=strip( tbnam )
  6.   if tbnam ='' then do
  7.   say 'Describes the Columns in a Database Table'
  8.   say ''
  9.   Say 'Arguments are DatabaseName table_name'
  10.   exit
  11. end
  12. call dbm 'start database manager'
  13. call dbm 'stop using database'
  14. call dbm 'start using database' dbname
  15. if result <> 0 then exit
  16. sql="select name,coltype,length, scale, nulls, colno from sysibm.syscolumns  where tbname like '"|| tbnam || "' order by name, colno"
  17. call dbm  sql
  18.