See below ....
$
vi a.sh
ab=$(pwd)
echo " "
echo "Current working directory is $ab"
FILE=$(basename $ab)
echo "FILE returns $FILE "
echo " "
ab=$(pwd)
echo "Current working directory is $ab"
BANK=$(dirname $ab)
echo "BANK returns $BANK"
echo " "
INFILE=${FILE}.${BANK}.$$
echo $INFILE
dam@athena:~$ ./a.sh
Current working directory is /home/dam
FILE returns dam
Current working directory is /home/dam
BANK returns /home
dam./home.11937
Not sure what you are trying to achieve...
I think what you probably wanted was
/home/dam.11937