at the moment I build some scripts to handle DB2 data. To capture the command output I try to use RxQueue

and for simple samples as “DIR |RXQUEUE” it work.

But for the following sample


‘DB2 –c –ec –m –t CONNECT TO database USER userid USING password’

‘DB2 –c –ec –m –t EXPORT TO “D:\TEST\test.ixf” OF IXF MESSAGES “D:\TEST\test.log” SELECT * FROM table |RXQUEUE’

Do I = 1 to queued()

   Say linein(“QUEUE:”)



I found in the queue always the message

SQL1024N Connection to database lost.  

Without ‘|RXQUEUE’ the commands run successfully within a rexx script


I know that is a very special question but anybody that already work with db2 commands and can help me?