Fixed length file & leading spaces

Jean-Pierre A. Radley appl at jpr.com
Wed Nov 17 14:19:02 PST 2004


Dennis Malen propounded (on Wed, Nov 17, 2004 at 04:55:01PM -0500):
| Ken,
| 
| Your the best. That's all I needed.
| 
| As usual I respond to the list once a problem has been solved in order to share my findings so others may learn.
| 
| The Problem:
| 
| A fixed length file is created without the use of -x because we are trying to use -a. All the fields created are exported perfectly, except for the first field which has leading spaces. In that case the field moves left causing the file to be out of sync for the receiver of the file who is expecting a certain length.
| 
| Resolution:
| 
| If the first field that you are exporting contains leading spaces, the entire line will move left. The field must be left justified in order for the export to work so that the leading spaces are to the right of the information as opposed to the left. The integrity of the number of required spaces will then remain intact.
| 
| Ken suggested: A(10)=""{xx to left justify.
| 
| Simple resolution which I should have thought of.

The other (and better) resolution, which Ken also suggested, was to
upgrade to the current version of filePro so that EXPORT can use the -x
and the -a options concurrently.  You've been totally silent on that.
Why?

-- 
JP


More information about the Filepro-list mailing list