How does the environment stay set

I am running this pre-script with a post scripts that needs to share the same variables. How do I keep the environment variable settings for the next script to access from the RMAN Script?

Prescript #1

#RMAN Script
#!/bin/ksh
ORACLE_SID=INVPRD;export ORACLE_SID
DBNAME=$ORACLE_SID;export DBNAME
LOGDIR=/u01/app/oracle/product/10.2.0/scripts/logs/rman;export LOGDIR
CURRTIME=`date +"%y%m%d%H%M%S"`;export CURRTIME
LOGF=$LOGDIR/bkp_${DBNAME}_FULL_${CURRTIME}.log;export LOGF
START=`date +"%m/%d %H:%M"`
rman msglog $LOGF <<EOF

RMAN script# 2

connect target backup_admin/emcnw@INVPRD.WORLD
RUN {
ALLOCATE CHANNEL t1 TYPE 'SBT_TAPE';
backup database;
release CHANNEL t1;
}
exit;

Post script # 3

EOF
RC=$?
STATUS=OK
if [ $RC -ne 0 ]
then
STATUS=Error
fi
END=`date +"%H:%M"`
MSG="$STATUS $DBNAME RMAN_Full Backup $START-$END";export MSG
#mailx -s "$MSG " romptechteam@txu.com,vviswan1@txu.com < $LOGF
mailx -s "$MSG " vviswan1@txu.com < $LOGF

Source prescript #1 inside the RMAN script, or write a 3rd script to do this

#!/bin/ksh
. script1
RMAN

I can't get what script #3 does. But the idea is to get the ENV variables defined in #1 to persist.