#21 Loss of connection

open
nobody
None
5
2009-02-10
2009-02-10
Anonymous
No

I am using version 3.4 Rexx with DB2 version 9.5. This Rexx script:
'DB2 -st -o CONNECT TO SAMPLE USER gknops USING xx;'
InlineCmd = "SELECT CHAR(CAT.TABNAME, 16), CAT.CREATE_TIME, CAT.TABLEID FROM SYSCAT.TABLES CAT WHERE CAT.TABNAME = 'SYSTABLES';"
'DB2 -stx' InlineCmd
'DB2 -st GET CONNECTION STATE'

gets this result:
Database Connection Information
Database server = DB2/NT 9.5.0
SQL authorization ID = GKNOPS
Local database alias = SAMPLE
SQL1024N A database connection does not exist. SQLSTATE=08003
Database Connection State
Connection state = Connectable and Unconnected
Connection mode =
Local database alias =
Database name =
Hostname =
Service name =

A bat version works fine. Any idea what is wrong or what to look at?
email gknops@covad.net

Discussion