cancel
Showing results for 
Search instead for 
Did you mean: 

Sender File Adapter FCC Question

Former Member
0 Kudos

Hello folks!!

I am trying to configure a FCC for Sender file adapter and wanted to consider a Line feed Carriage return line which will look as below to be a empty tag in XML. After Line 4 there will be a blank line which identifies the start of next record. I tried using Field.MissingLastFields , Field.endSeparator etc., Perhaps I am not using the correct value. Any help appreciated.

Line1

Line2

Line3

Line4

Line1

The expected XML is as below:

<Record>Line1</Record>

<Record>Line2</Record>

<Record>Line3</Record>

<Record>Line4</Record>

<Record></Record>

<Record>Line1</Record>

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member184681
Active Contributor
0 Kudos

Hi PIBrainer,

Try with the following settings:

Recordset Name = Recordset

Recordset Structure = Dummy,*

Parameters:

Dummy.ignoreRecordsetName

Dummy.endSeparator = u2018nlu2019

Dummy.fieldNames = Record

Dummy.missingLastFields = add

Hope this helps,

Greg

Former Member
0 Kudos

Hi Greg

Thanks for your feedback. I tried and it didn't work. below is the FCC i have in sender adapter

RecordSetName = RecordSet

RecordSetStructure = Dummy,*

Dummy.fieldNames = Record

Dummy.endSeparator = 'nl'

Dummy.missingLastfields = add

Dummy.ignoreRecordsetName = true

Dummy.fieldSeparator = 'nl' and also I tried with Dummy.fieldFixedLengths = 255 .

Still I don't get the empty tag for the blank line in the file, so my output is still same . Please note the blank line doesn't have a space so if I place the cursor and move to next in blank line it will go to next line ( Carriage return and line feed).

Please suggest .

baskar_gopalakrishnan2
Active Contributor
0 Kudos

I think generating empty line inbetween every set of records might not be possible using fcc conversion parameters. After your message mapping you might want to try simple java mapping to achieve this. This might be easier too. You might want to wait for experts opinion.

Former Member
0 Kudos

Hi Bhaskr

Thanks for your response.

The FCC is on sender Communication Channel and i want to read the blank lne in text file using FCC because blank line is the one which identifies the end of one set of transaction ( Say one Purchase order or Sales Order) , So I may need this empty tag in my message mapping to identify the end of transaction and start of next transaction. I hope this clears my requirement .

former_member184681
Active Contributor
0 Kudos

Dear PIBrainer,

Try using the combination of:

dummy.fieldFixedLengths = 255

dummy.keepIncompleteFields = YES

For the latter, NO is the default value.

This should help you force PI creating this empty <Record></Record> tag for the empty line.

Hope this helps,

Greg

Former Member
0 Kudos

Hi Greg

No Luck, below is the parameter I have in Sender FCC

Dummy.fieldNames = Record

Dummy.endSeparator = 'nl'

Dummy.ignoreRecordsetName = true

Dummy.fieldFixedLengths = 255

Dummy.missingLastFields = add

Dummy.keepIncompleteFields = YES

Blank line means there is no valid space character its just line feed and carriage return to identify the end of set of records. But if I have a space I was able to get the empty tag. Please let me know if that is possible at all.

Thanks for you help.

former_member184681
Active Contributor
0 Kudos

Dear PIBrainer,

If you hadn't succeeded with the set of parameters that you described above, than I think it might not be possible at all. One more thing to do - you can refresh the sxi_cache to make sure PI uses your most up-to-date configuration, not a cached one.

If still no success, then most probably you will have to write a trivial custom Adapter Module that will add a blank in the empty line (between each two consecutive "new line" characters), before the FCC is even executed. This should work for you.

Hope this helps,

Greg