If the code above doesn't work as expected, please post the exact command and complete output/error that you're getting.
The special builtin array ENVIRON may not be available in your awk implementation.
It contains only exported variables, it that's not your case, use bipinajith's solution
It got executed but it hasn't create the file as expected, it didn't take any value from the shell variable. I ran teh script with sex-x, so below is the one executed on.
Actual Code: wc -l $filename | awk '{ print $1"|"$2"|"'$SOURCETYPE' }'>>$AUDITFILENAME