Hello list,

I can't find an elegant way to pass a variable containing a long string to a 
USS shell command executed under BPXBATCH. 

Looking at what the JVMLDMxx module (JVM invocation) does I tried something 
like the following:

//RUNTEST  EXEC PGM=BPXBATCH 
//STDOUT   DD   SYSOUT=* 
//STDERR   DD   SYSOUT=* 
//STDENV   DD   * 
IJO="-Xms16m -Xmx128m" 
IJO="$IJO -verbose:class" 
IJO="$IJO -Dfile.encoding=ISO8859-1" 
//STDPARM  DD * 
SH  echo $IJO 

But the echo command returns the following:

"$IJO -Dfile.encoding=ISO8859-1"

Which shows that variable concatenation doesn't work as I would expect.

Manually executing the same commands under OMVS z/OS shell, everything works 
fine:

IBMUSER:/u/ibmuser: >IJO="-Xms16m -Xmx128m"               
IBMUSER:/u/ibmuser: >IJO="$IJO -verbose:class"            
IBMUSER:/u/ibmuser: >IJO="$IJO -Dfile.encoding=ISO8859-1" 
IBMUSER:/u/ibmuser: >echo $IJO               
-Xms16m -Xmx128m -verbose:class -Dfile.encoding=ISO8859-1 

I know I may use a real file, or even a USS file to write a single assignment 
in one line, but I would like to avoid carrying unneeded baggage.

What I am doing wrong?

Thank you,
mario

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to