substitution of variable in template

I am a beginner programmer. I have a file that I am able to read through and place the data into variables using the read command. The data is then set to another variable and all the data in that variable resembles the file that I was able to read through, however when I use the sed -e "s/DATA/${data}/" template > newfile name, I can't substitute the data below into the ${data} variable.

000111 123456 02MAR02 02APR02
000222 987654 02MAR02 03APR01

Does any one have any ideas what we could do

Hi there. I had a similar problem that was solved in this thread: