Unable to export Directory paths through Script

Following is the output of .profile file -

$ cat /home/estdm2/.profile

#!/bin/ksh
set -o vi

alias l="ls -ltr"
umask 002

Following is the path setting script.

$ cat DM_ENV_VARS_NEW.ksh

#!/bin/ksh
. /home/estdm2/.profile

sEnv=$1
echo "We are in ${sEnv} environment"
echo "STEP010 - Set Environment Variables for script."
export DM_ETL_HOME=/etl/estdm2
export SCRIPT_DIR=${DM_ETL_HOME}/scripts
export BASE_LOG_DIR=${DM_ETL_HOME}/log
export LOG_DIR=${BASE_LOG_DIR}/script

When I call DM_ENV_VARS_NEW.ksh script from another script and print the variable, it prints nothing. So the export is not working properly

$ cat /etl/estdm2/dev/scripts/test.ksh

#!/bin/ksh
#
echo "Testing the script - DM_ENV_VARS.ksh"

/etl/estdm2/dev/scripts/DM_ENV_VARS_NEW.ksh DEV
echo ${DM_ETL_HOME}
echo $BASE_LOG_DIR
$ /etl/estdm2/dev/scripts/test.ksh
Testing the script - DM_ENV_VARS.ksh
We are in DEV environment
STEP010 - Set Environment Variables for script.

I dont know what's going wrong with such a simple script.

I would appreciate any suggestion.

Thanks
Sumeet

. /etl/estdm2/dev/scripts/DM_ENV_VARS_NEW.ksh DEV

Try preceding the line with dot-space (same as you did for sourcing .profile).

It worked but can you explain how did that help. Is this "." forcing the child script to export the paths in same shell as parent script?

Thanks
Sumeet

Yes - its called "sourcing".