cancel
Showing results for 
Search instead for 
Did you mean: 

File Content Conversion -- Next line has to come immediately.

Former Member
0 Kudos

Hi ,

I have a structure with 3 fields and it is not mandatory that evytime all the fields has to come.

MH75 TEST1234 TEST12345

MH70 TEST1234 1

ML14 T1234

ML11 TEST1234 09151

ML62 TEST1234 4

I need to get the nextline once the record is ended like above.

1st record -- nextline has to come immediately after TEST12345

2nd record --nextline has to come immediately after 1

3rd record -- nextline has to come immediately after T1234

File COntent I used:

HEADER.fieldFixedLengths 5,17,177

HEADER.fixedLengthTooShortHandling Cut

HEADER.endSeparator 'nl'

But the output I am getting like below..

MH75 TEST1234 TEST12345

MH75 TEST1234 1

ML14 T1234

ML11 TEST1234 09151

Gap is coming If the value is coming. I dont want to get that gap when the field wont come. If the record stops at 2nd field then the nextline has to come immediatly and should not worry of 3rd field.

Please let me know if anyone knows.

Thanks

Seema.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Seema,

Since you are using fixedFieldLength so because of this if the field won't come then also you will get gap.

What you can do is, if you know the incoming fields are space or tab delimated then use the below code in your sender CC.

HEADER.fieldNames field1,field2,field3

HEADER.fieldSeparator (if space, then just use notepad give one space then copy & paset it here.

in case of TAB also u can do the same trick)

HEADER.endSeparator 'nl'

Regards,

Sarvesh

Former Member
0 Kudos

Hi Sarvesh,

My scenario is Idoc to FIle.. So it will be receiver adapter.. not the sender adapter,

Thanks

Seema

Former Member
0 Kudos

use space as end separtor instead of nl. it shd work.

Former Member
0 Kudos

Hi,

Suppose the Receiver side structure is linke this

order_recv_dt

order_recordset

order_row

f1

f2

.

.

then

Parameters in CC

Record Structure : order_recordset, order_row

order_recordset.fieldSeparator : 'nl'

order_row.fieldSeparator : ,

order_row.endSeparator : 'nl'

Former Member
0 Kudos

Well, do like this.

Recordset Structure (declare your fields e.g. HEADER)

HEADER.fieldSeparator (give the delemeter comma or space whichever is applicable)

HEADER.endSeparator 'nl'

Thats it.

Former Member
0 Kudos

use endSeparator = ' '

so each new record will be placed one after another separated by white space