We receive fixed width ASCII (not EBCIDIC) file from MF to UNIX server. We have trailing spaces in the file.
What happens during FTP transmission, those trailing spaces gets chopped off. Is there any option in FTP when to transfer file from mainframes to unix not to chop off those spaces?
If the Record Format of your file on Mainframe is 'VB' (Variable Block) then during FTP transmission (ascii mode) the trailing spaces will be removed.
If the Record Format of your file on Mainframe is 'FB' (Fixed Block) then during FTP transmission (ascii mode) the trailing spaces of the line will be displayed on unix.
Hemang, the transmission team told me they are sending file in Fixed Block format in ascii transmission mode.
Is it possible for you to provide the command from your transmission team please?
awk,
At moment we are using the approach you have suggested as a temporary fix. In the long run we are asked not to use this temporary solution.
Is the requirement that the transmission not truncate spaces or that you end up with a file with the right length records? Or are you saying that you have variable length records and so you can't restore the right number of trailing spaces?
If the requirement is for the transmission to not truncate spaces, Porter has already suggested transmitting in Binary and then translating to ascii using dd.
Hemangjani also suggested about FB vs VB. (I'm unfamiliar with this but assume it is a viable appoach)
I was simply suggesting an alternative way to approach the problem. If that failed to meet your requirments, I'm sorry I wasted your time and mine.