Can we use | along with \n as a record terminator in a Service File


We have a file where | is delimiter for fields. as part of the fields we are receiving comments which may have line feed(\n) in it. and the same line feed is the record delimiter.

To avoid issue with comments with \n, I am trying to use "|\n" as Record terminator in service file.

But it is always parsing only first record, not moving to second record.

Is there any way we can user this combination as record terminator.



Keep up to date on this post and subscribe to comments

October 9, 2019 - 8:48am

Hi Shivakumar, As you mentioned your file is having a delimiter of | and to parse it you need to add parse Pdelimiter rule with custom option to mention | as delimiter. And you do not need the dilimiter to be mentioned in service rule. Just \n would be fine in service rule. I have attached screenshot of parse rule where custom delimiter can be defined.



October 11, 2019 - 3:57pm
Response to kundp

I tried the same but it is not working. it is breaking the record when it encounters the line feed and omitting all the following values. and also it is not moving to next record.

File type is .dat.

Sample record:

Value1|The record for / XYZ / Client ($x,000)  / The Work Item  with client.
:extra comment|WHAT|||Work status|Last Value|