So far, I have not seen the job cards that are produced. Please show us both the working job card and the failing job card.
It is not clear what 'submitted directly' means. Please elaborate.
I suggest the following tests:
1. elminate rexx logic:
a. build file with your jobcard and IEFBR14 step, for example named: 'AR62199.TEST.JCL'
b. build rexx program, for example, named 'AR62199.TEST.EXEC(test1)' :
Address TSO "SUBMIT 'AR62199.TEST.JCL' "
c. from ISPF option 6: EXEC 'AR62199.TEST.EXEC(test1)'
c. from TSO READY, EXEC 'AR62199.TEST.EXEC(test1)'
2. test environment:
a. from ispf option 6, SUBMIT 'AR62199.TEST.JCL'
b. from TSO READY, SUBMIT 'AR62199.TEST.JCL'
Does the exec use any ISPF services or dialog variables? Please check the return codes. It likely will not work correctly outside of ISPF.
The examples seem to show/say that being submitted from TSO READY fails and from ISPF option 6, it works. You should look for IKJEFF10 somewhere in your ISPLOAD or ISPLLIB concatenation.