sounds like you did not source the environment variables.
find a line aboue sourcing an environment. it will be commentedout.
under it will be something like
if
ifexists environment then environment
fi
add this in after the "fi" line, adjusted for your environment
#so sm will have its environment in the subshell
. /your/full/path/to/the/siteminder/webagent/nete_wa_env.ksh
that should fix the issue