Hi,
I have a requirement of converting a comma delimited flat file to a fixed width flat file.
The data in the comma delimited flat file looks something like this.
1,CSB01B,7.4,SEA01T,8.4,S1A01R,9.4
2,MUP01C,10.4,FSC01Z,11.4,CDE01F,12.4
I want the data to be in fixed width columns in the target flat file, something like below.
1 CSB01B 7.4 SEA01T 8.4 S1A01R 9.4
2 MUP01C 10.4 FSC01Z 11.4 CDE01F 12.4
Could any one please guide me on this..
Thanks in Advance.
Comma delimited to fixed width flat file.
Moderators: chulett, rschirm, roy
Comma delimited to fixed width flat file.
- Jaysheel -
Re: Comma delimited to fixed width flat file.
If I understand the problem, have you tried to use the function Ereplace(String,',',' ') ? The data 7.4 must be converted to 'blank'||7.4 or 'blank'||'blank'||7.4
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Read the file as comma delimited.
Write the file as fixed width format. The display width will be the width of each column in the written file.
Put a Transformer stage between the two Sequential File stages so that you can have links with different format properties.
Write the file as fixed width format. The display width will be the width of each column in the written file.
Put a Transformer stage between the two Sequential File stages so that you can have links with different format properties.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.