Just a thought, when the data comes over from a mainframe, won't it be in EBCDIC encoding? You will probably have to convert this to ASCII before you can do anything with it.
My team is receiving file from mainframes, for which we are not writing FTP command in a JCL.
My question is how come 3 different commands which help in estimating no of chars in record give different output?
Since any normal ASCII file, the command I mentioned produces the same counts.
The file which we receive is in ASCII, because when I cat it, I can see the ASCII business contents in it.
You don't provide much info, but I will make a guess based the little info I have. Those files are not organized as a collection of lines of ascii characters. A line will have a max length and it must be terminated by a newline character. Files like this are the only files those commands are designed to work with. So each command is screwing up in a slightly different manner.
Yes you are right Perderabo, the file which we received from mainframes had these weird '^@' chars, which is not detectible by simple cat command. It could be only seen by cat -v.