how to call rexx from command line so it can access ISPF

Does any one know how to code the call to a rexx program in a command line build to enable the execution of ISPF commands in the REXX? I coded my command line originally like this
tso "EXEC '....REXX(PERSDEP)' 'arguments'"
but then I couldn't execute any ISPF commands in my rexx.
so I tried to code the command line like this
tso "ISPSTART CMD(EXEC '....REXX(PERSDEP)' 'arguments')"
but then I got a error that ISPPROF was not allocated which means that an ISPF environment does not exist.
So how can I set up the call to my REXX so that an ISPF environment will exist?
I am running this as a command line - Rational Build agent build
tso "EXEC '....REXX(PERSDEP)' 'arguments'"
but then I couldn't execute any ISPF commands in my rexx.
so I tried to code the command line like this
tso "ISPSTART CMD(EXEC '....REXX(PERSDEP)' 'arguments')"
but then I got a error that ISPPROF was not allocated which means that an ISPF environment does not exist.
So how can I set up the call to my REXX so that an ISPF environment will exist?
I am running this as a command line - Rational Build agent build
3 answers

Does any one know how to code the call to a rexx program in a command line build to enable the execution of ISPF commands in the REXX?
Since this is a question on the usage of z/OS, I think you will be able to get better answers somewhere else, but I guess you can use TSO/ISPF gateway for that purpose.
A very simple sample that invoke the gateway from a Unix shell command is:
#!/bin/sh
export PATH=$PATH:/usr/lpp/ispf/bin
echo "<?xml version=\"1.0\"?>
<ISPF-INPUT>
<SERVICE-REQUEST>
<service>ISPF</service>
<session>NONE</session>
<command>EXEC 'TAMI.JAZZ.EXEC(TEST)'</command>
</SERVICE-REQUEST>
</ISPF-INPUT>" | ISPZXML
Please refer to manual for more details.

I attempted to code this. I created a script as you suggested and coded my command line as follows:
/local/jazz/BLZCONF/scripts/callPersDeploy
and my arguments as follows:
${pbDir} ${deploy} ${ovrlay} ${dest} ${sappl}
When I execute the command line build I get the following error message:
java.lang.IllegalArgumentException: No Participant Found
Do you know what I am doing wrong?
/local/jazz/BLZCONF/scripts/callPersDeploy
and my arguments as follows:
${pbDir} ${deploy} ${ovrlay} ${dest} ${sappl}
When I execute the command line build I get the following error message:
java.lang.IllegalArgumentException: No Participant Found
Do you know what I am doing wrong?

I attempted to code this. I created a script as you suggested and coded my command line as follows:
/local/jazz/BLZCONF/scripts/callPersDeploy
and my arguments as follows:
${pbDir} ${deploy} ${ovrlay} ${dest} ${sappl}
When I execute the command line build I get the following error message:
java.lang.IllegalArgumentException: No Participant Found
Do you know what I am doing wrong?
I have no idea... What do you see in the stack trace for the IllegalArgumentException?