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...