What Operating System and version do you have? What Shell do you use?
You seem to refer to ^M a lot (which I interpret as intending to mean ctrl/M or carriage-return).
Is the input file a Microsoft format text file with carriage-return line-feed at the end of each line? Or is this a normal unix text file with just line-feed at the end of the line. Or is this an old MAC format text file with carriage-return at the end of each line?
Does Filename occur at the top of each file called Filename?
I'm using bash shell in AIX 6.1
^M microsoft text
Yes its a Microsoft format text file with carriage-return line-feed at the end of each line
No the file name I've mentioned in example will be a free test like "Null in a Not Null column" or "0 Length Char". This will be standard in all files.