on 02-27-2008 9:01 PM
I have a file that so large I had to break into many segments. Now I have to write a header line in the first segment and none of the other segments. I have tried doing this with file content conversion but it writes the header in every segment. I have also looked to using Java Beans but this also put a header in every segment. Any suggestions to point me in the right direction would be greatly appreicated
Carl:
Let me understand your requirement. You have a file (say around 1 Million rows/records) and the first row is header. You want to divide that file into small files ( each containing say 15000 rows) and only first file contains the header. is that correct. and Is it a File to File scenario??
Edited by: Guru on Feb 28, 2008 6:29 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Carl !
The only idea I have right now, is to develop one Java Proxy Client and one Java Proxy Server, to use them as sender and receiver adapters.
In the sender, you can open the file and flag each segment with its "piece number", maybe as part of the filename (_001, _002, etc.)
Then in receiver, based on the piece number, you decide to add a header or not. You can also avoid the idea of the Java Proxy Server and use the file adapter with File Content Conversion and add the header record via graphical or java mapping.
Adapters are stateless, so once segments are in XI, you don't know whether one is the first one, a middle one or the last one, unless you store the state somewhere, for example, using JCO via java mapping or graphical mapping.
Regards,
Matias
ps :please award points if helpful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.