on 09-01-2009 2:31 PM
Hi Experts,
Is there any way to eliminate first line and last line of an incoming file?
Regards,
Vishal
What about picking up the whole file and then ingnore the undesired fields to map at target side??
--Sarvesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think this is a problem of hierarcy. Have you maintained the your structure like this..
MT_TEST
Recordset
field1
field2
.
.
.
Recordset
MT_TEST
infact a good example is given in the blog which Abhishek has provided you, so follow that and do FCC accordingly. And then in mapping you map your desired fields to target.
Also make sure you have created your source struce as per your incoming file.
--Sarvesh
Edited by: Sarvesh Singh on Sep 1, 2009 7:56 PM
Hi,
i Have a input file like
Header..........................
01abc ufbcn.......................
68hdjkd dcdc.................
34djfvdjvndfjvn..............
...
....
....
...
...
...
...
Footer..........
and my Data type is
<Header/> 1..1
<value/> 1..1
<Body/> 1...unbound
<Name>
<value>
<Footer> 1..1
<value>
The first line in input file starting with Header should go value under Header.
The last line should go to footer
Rest all lines should go to body.
i tried using keyfieldvalue ,but there is no similarities in the values that are coming in body.
please suggest me how this can be achieved.
You should recreate your data type based on example as given in this blog and then ignore the header and footer in your mapping.. probabily you may have to change the udf a little bit based on your structure..
/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
--Sarvesh
Did you try using Document Offset property of the FCC to ignore first line
Have Document Offset = 1
Regards,
Abhishek.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes I tried that. The requirement is to convert the following file to an xml structure:
MGR:ABC:HDR........................>Start of header
Name1......Value1
Name2......Value2
Name3......Value3
.
.
.
Footer
to the following structure
<DataType>
.........Record(1..unbounded)
...............Name
...............Value
How is it possible to acheive it using fcc?
Regards,
Vishal
Since it is Sender FCC.....you have the liberty of changing the Data type (if allowed).....then you can apply the concept as shown in this blog:
/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
Blog almost similar to your requirement....
Then in mapping do not use the Header and Footer sections.....map other nodes (Record)...hopefully should serve the same purpose.
Regards,
Abhishek.
User | Count |
---|---|
93 | |
10 | |
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.