Fog Creek Software
g
Discussion Board




Welcome! and rules

Joel on Software

Exporting to AS400

We need to generate some formatted text files for this.  I'm thinking up an approach... the concept would involve a Structure that identified all the fields and then generated a file with padded fields (ie. 9 characters long, 30 characters long, etc... )

Anyone know of a good approach to this?

David Seruyange
Monday, June 13, 2005

it greatly depends on your data source and your in-house toolset.  and the requirements.
if you have a standard etl tool it is probably the best solution. 
if not and the source is a relational db, a bcp out of a formatted view (or table) can work well.  this is possibly the simplest and easiest to implement.
a compiled custom solution is always the last choice for me - i feel the complexity of making changes is greater than with either of the prior solutions.

bw
Monday, June 13, 2005

(ADO.NET) XML -> XSLT -> fixed-width text

You're code remains the same, the transform can be modified as desired.

el
Thursday, June 16, 2005

I'll second the XML->XSLT. I used it to go back and forth between HP Minicomputers and EDI files, and it worked very well.

Cory Foy (cornetdesign.com)
Tuesday, June 21, 2005

*  Recent Topics

*  Fog Creek Home