Created On:  21 October 2011

Problem:

The program uses a line sequential file with fixed length records.  However, when writing records to the file the trailing spaces are removed.  For this application the trailing spaces are necessary and should not be removed.  Why are the trailing spaces removed?

Resolution:

Print files always have trailing spaces removed.  Somewhere in the program there is a WRITE statement that includes the ADVANCING phrase.  Even though this file is not specifically defined as a print file, the ADVANCING phrase causes it to be handled as a print file. 

Removing the ADVANCING phrase from all write statements for this file will resolve the issue.