check:
- has the DB2 REXX Support has been installed at the remote DB2 system (this is feature that must be installed separately, and you need the REXX support packages bound at the remote DB2 system if you use the DRDA protocol, you don't need them if you use PRIVATE protocol - remember that PRIVATE protocol works only between DB2 for MVS'es))
- if one of the DB2 systems is not on a mainfraime, you can only use DRDA protocol - that means that Queries are shipped to the remote site without resolving object names, i.e. all names mentioned in the queries must be resolvable at the remote site
if that all does not help, email me, i'll send a sample REXX out of my collection
greetings, Heinz