cancel
Showing results for 
Search instead for 
Did you mean: 

How to ignore the last recrod end separator

Former Member
0 Kudos

Hi Team,

I am creating a file like below

1,100,200&2,200,300&3,300,400&

In this file

First Record is--1,100,200

Second Record is--2,200,300

Third Record is--3,300,400

I am using the field separator is ,(comma) and end separator is &.

My requirement is last record does not contain the end separator(&).

My output file should be like this

1,100,200&2,200,300&3,300,400

Regards

Swathi

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member303666
Active Participant
0 Kudos
Former Member
0 Kudos

Hi,

You can't remove last separator if all records are the same config.

You can do it with a script and configure it in your communication channel (Run operating system command after message processing).

Regards,

Carme

Former Member
0 Kudos

Hi,

See, if this feature is useful in your case,

ignoreRecordsetName true

santosh.

Former Member
0 Kudos

Hi Santosh,

Still its taking a endseparator.

Former Member
0 Kudos

Swathip,

Number of records is always 3 or is it dynamic?

In case if the number of records is always 3 (for e.g. A, B and C), then mention endSeparator parameter for records A, B and don't mention endSeparator for record C.

Regards,

Geetha

Former Member
0 Kudos

Hi Geetha,

the number of records are dynamic.

former_member191435
Contributor
0 Kudos

Hi Swathi,

You can use endseparator as '0'

Thanks,

ENivas

Former Member
0 Kudos

Hi,

I need a separator for each record, but it should not read for the last record

former_member191435
Contributor
0 Kudos

Hi Swathi,

U can use another mapping in ur scenario.

Just take input as field with string and read whole data and create output as a field with string den do the below mapping

field1

endswith--


> if with out else
> replace string
--


>target Field

&&

& space

field1

concat

&

first check source field is endswith & or not if it endswith & then concat & to field1 then replace && to space and map to target u will get ur scenario correctly.

Thanks,

Enivass

Edited by: enivas on Jan 12, 2012 10:57 AM