The way I've done it is to 'echo' the commands together as one long string, and 
then pipe that to su:

//RUN    EXEC PGM=BPXBATCH
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//STDIN  DD DUMMY
//STDPARM DD *
SH
   echo 'echo "Starting" ;
   cd / ;
   ls -la ;
   id ; 
   echo "Ending" ' | su

Note that the entire 'script' is within single quotes so you need to escape any 
single quotes you need inside. 

STDPARM is great for this because it automatically concatenates the lines 
together with the need for continuation characters.

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

Reply via email to