//SYSPRINT DD SYSOUT=9
//SYSIN DD DUMMY
//SYSUT1 DD DDNAME=MYREXX
//SYSUT2 DD DISP=(NEW,PASS),DSN=&&TMP(MYREXX),
//MYREXX DD *
say 'Hello World'
//STEP2 EXEC PGM=IKJEFT01,DYNAMNBR=45
//SYSPROC DD DISP=(OLD,DELETE),DSN=&&TMP
//SYSTSPRT DD SYSOUT=H
//SYSTSIN DD *
But instead of 'hello world', you should write rexx program to:
1. trap command response from LISTDSD command
2. build another job with the command response inline
3. with /*ROUTE XEQ so it runs on the originating system
4. perhaps IEBGENER to copy command response to sequential dataset with disp=MOD. maybe add a header line so you know which system the response is from.
5. submit job