Vote count:
0
I need to create a Flat file without column headers, no comma separated values but each column will have a fixed starting position and a fixed length in the text file. For example, below is the text file to be created with six columns
Column1 Column2 Column3 Column4 Column5 Column6
abc 1 New emp xxxx xxxx xxx
Fixed starting position and a fixed lenth values for these columns as are below;
Column1 : Starting Position -1, Fixed Length -4
Column2 : Starting Position - 8, Fixed Length - 2
Column3 : Starting Postion - 11, Fixed Length - 10
Column4 : Starting Position -1, Fixed Length -5
Column5 : Starting Position - 10, Fixed Length - 2
Column6 : Starting Postion - 15, Fixed Length - 5
The out put file each line have only 20 characters length.First 3 columns comes in first line and 4-6 columns comes in 2nd line.
OUTPUT FILE:
1234 89 11121314151617181920 12345 1011 151617181920
How to add line breaks to output fixed width flat file
Aucun commentaire:
Enregistrer un commentaire