cancel
Showing results for 
Search instead for 
Did you mean: 

Removing Headers from my text file

Former Member
0 Kudos

Hi friends,

My Text File contain data like this

<b>MAT_NO </b> . <b> MAT_NAME</b>

M1 . MONITOR

M2 . PROCESSOR

M3 . USB

<b>MAT_NO </b> . <b> MAT_NAME </b>

M3 . HARD DISK

M4 . KEYBOARD

<b>MAT_NO . MAT_NAME </b>

M5 . CHIPS

M6 . CABLES

Ect.............................................

the above is my Text file.. now i want to load this file into XI and the output is in XML format..

but the requirement is i want to skip All the Headers.. and i need to load only the data .. how can i skip all the headers from my Text file.. there are lot of headers are repeating there...

for this what can i do... is it enough to Content Conversion or we need to do any other conditions also... can u plz give me the steps for this..

Thanks

BABU

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Simplest soln would be to include the header values in the converted XML and ignore them in mapping. Or you can build your own adapter module that will remove all headers.

Regards,

Jai Shankar

Answers (3)

Answers (3)

former_member614185
Contributor
0 Kudos

Hi,

Use content conversion and in the content conversion parameter give the value for ur header as zero('0'). it will eleminate ur header

Former Member
0 Kudos

Hi BABU,

While mapping do not map the header fields to target fields, but while doing content conversion configuration you have to mention header and item both to pick the file by adapter.

Create the Data type with all fields (Headr & Item) but while mapping do not map the header filds to target. But in your Content Conversion Define every thing (Header & Item filed lengths etc.) so this way your file will be ficked up by adapter and while mapping only Item values will be mapped and you will get only item data in your XML file.

Below is the example when you have HEADER & ITEM structure.

FCC is case sensitive, give all the names in FCC same as your Data Type.

In Recordset Structure = Header,1,Item,*

Header.fieldFixedLengths = (field lengths) e.g. 1, 4, 7

Header.fixedLengthTooShortHandling=ignore

Header.endSeperator='nl'

Item.fieldFixedLengths = 2,4,5 (whatever)

Item.endSeparator = 'nl'

Item.lastFieldsOptional = YES

<b>Note:</b> Since your Header data is coming in between the text file so you can not use Offset parameter in the content conversion.

Regards,

Sarvesh

****Reward points, if found helpful.

Message was edited by:

Sarvesh Singh

santhosh_kumarv
Active Contributor
0 Kudos

Hi Babu,

Ignore the header node in mapping. It could be the better option.

Regards

San

there is a Way.