Iviva,
This was posted a while ago, so maybe you are not looking at this post - but I stumbled upon it and thought I would answer.
So, assuming a couple of things...
1. You are running the REXX in TSO or CGI.
2. You are running the REXX on a system that has direct access to the DB2 Subsystem.
You could use a Rexx like this....
/* rexx */
arg db2ssid command
x = outtrap("retline.","*","noconcat")
QUEUE command
QUEUE 'END'
'DSN S('db2ssid')'
x = outtrap("off")
do i = 1 to retline.0
lineout = retline.i
say i">>"lineout
end
To send a Db2 command to the DSN TSO command processor and display the output, so you could issue a "-dis thread(*)" to it and then do a "-cancel thread xxxxx" or whatever.
Hope that helps...