Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a flat file with fixed width fields

Status
Not open for further replies.

jdl0523

Technical User
Jun 19, 2003
5
0
0
US
I would like to create a flat file with fixed field widths.
Using derived fields and Lpad, Rpad, Substr, and Concantenante functions I have been able to achieve this. However the problem i am having is that I need to wrap the field to the next line after the 96th character. Is this possible? If so, what approach should I take?
 
You are going to need a macro to do this. In your macro you will loop through all the records writing them to a file and managing the 96 char issue.

CharlesCook.com
ADP - PeopleSoft - SAP
ReportSmith - Crystal Reports - SQR - Query - Access
Reporting - Interfaces - Data Mining
 
Quick question, if you don't mind. Why do you need to wrap the record to the next line? This will require a carriage return and line feed and may make reading the file with another application difficult. I use several files with fixed field widths i.e record length 108, and I can read them ok.

David Black, CSQA
Sr. Systems Analyst
Teepak, LLC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top