In the simplest form I am puzzled why this script does not work as expected as a here script changing users with su - user <<EOF.su - db2prd<<EOFPARMDATE=1111111echo parmdateecho $PARMDATEEOFproduces output:parmdateand removing the su/EOF part:PARMDATE=1111111echo parmdateecho $PARMDATEproduces:parmdate1111111I am unable to figure out why ksh variable assignment is not working and how to make it work, presuming the environment wasn't set, etc.  I have tried everything I can search on.  Variable assignment seems broken in the su - <<EOF part.This is just an example from a much larger script that switches users for some maintenance activities.
ksh <
quoting;ksh;here document