It sounds like you’re calling a function from REXX that accepts input from the user, and want to simulate this input from your REXX.
This is a common problem, however I’m not aware of any way to do this. If you call a function from REXX, your REXX won’t get control back until the function has ended.
However, many TSO/E function accept parameters that you can use in your REXX. Others (such as TSO/E FTP) accept a file (which you can allocate in your REXX) which can contain all the commands you want to use.