Command failed (Substitution failed while writing file) createfile until E_O_F

Not Sure how to pass variable in Create file. I am getting error in action script " Command failed (Substitution failed while writing file)". below is the sample action script.
//Stop Service
createfile until E_O_F
{parameter “code1” of action} -----Action Failed Here
mkdir /opt/tmp/bkup
E_O_F