cancel
Showing results for 
Search instead for 
Did you mean: 

FCC Parameters : when Keyfield is not unique

santosh_k3
Active Participant
0 Kudos

Hi All,

I have a scenario File(NFS)>XI->File(FTP) scenario

I have Sender file format as shown below with pipe-delimeter(|) it consists of only Data records 1 to unbounded.

Data: 0020000004_1|Mr|Test||Usr|19490815|5|||Test Unmetered Street

0020000004_2|Mr|Second BP||User|19880815|5|||Test Unmetered Street

0020000004_3|Mrs|Third BP Mahesh||User2|00000000|5|||Test Unmetered Street

0020000005_1|Mr|Johnes||Lawton|00000000|5|||Test Unmetered Street

And receiver file should be with Header, Data ,Trailer

Header : ClientRef|Title|ForeName|Middle Name|Surname|DOB|Flat No.|Building Name|Building No.|Street Name

Data : 0020000004_1|Mr|Test||Usr|19490815|5|||Test Unmetered Street

0020000004_2|Mr|Second BP||User|19880815|5|||Test Unmetered Street

0020000004_3|Mrs|Third BP Mahesh||User2|00000000|5|||Test Unmetered Street

0020000005_1|Mr|Johnes||Lawton|00000000|5|||Test Unmetered Street

Trailer : Trailer|4

I have done the mapping to generate Header,Data,Tailer records.

My question is how to specify FCC parameters in receiver channel to generate Header, Data ,Trailer records.

In sender Comm Channel , i am specifying FCC as

RecordsetName : Record

RecordsetStructure : Data,*

Data.fieldSeparator : |

Data.endSeparator : 'nl'

Here if i specify ReordsetStructure : Data,*

i need to define Keyfieldname , but my Keyfield is not unique for Data records

In reciver Comm Channel ,i am specifying FCC as

RecordsetName : Record

RecordsetStructure : Header,1,Data,*,Trailer,1

Header.fieldSeparator : |

Header.endSeparator : 'nl'

Data.fieldSeparator : |

Data.endSeparator : 'nl'

Trailer.fieldSeparator : |

Trailer.endSeparator : 'nl'

same way , Here if i specify ReordsetStructure : Header,1,Data,* ,Trailer,1

i need to define Keyfieldname , but my Keyfield is not unique for Data Records

So can anybody suggest me how to generate the required output format.

Thanks

Sai.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sai,

in the sender , since all your records are "Detail" records so u dont need to specify any key field.

YOu require Key field when you have define more than 1 recordset structure. In your case there is only structure so u can use the following

RecordsetStructure : Data,*
Data.fieldSeparator : '|'
Data.endSeparator : 'nl'

for receiver FCC u dont need any Key field.

RecordsetStructure : Header,1,Data,*,Trailer,1
Header.fieldSeparator : '|'
Header.endSeparator : 'nl'
Data.fieldSeparator : '|'
Data.endSeparator : 'nl'
Trailer.fieldSeparator : '|'
Trailer.endSeparator : 'nl'

try this, it should work..

santosh_k3
Active Participant
0 Kudos

Hi biplab,

Thanks for u reply,

Now my scenario is working.

i am using the

RecordsetStructure.fieldSeparator

i.e.., without quotation marks

Suppose if the scenario is reverse ,say

Sender FCC parameters are like this.

RecordsetStructure : Header,1,Data,*,Trailer,1

Header.fieldSeparator : |

Header.endSeparator : 'nl'

Data.fieldSeparator : |

Data.endSeparator : 'nl'

Trailer.fieldSeparator : |

Trailer.endSeparator : 'nl'

In this case,whether Keyfield name is required?

Suppose if keyfield value is not unique in Data records how to solve the issue?

Receiver FCC parameters are like this.

RecordsetStructure : Data,*

Data.fieldSeparator : |

Data.endSeparator : 'nl'

Thanks

Sai

Former Member
0 Kudos

Hi Sai

In your new case, Yes key field will be required. ( It would have not required if there was no trailer record. i.e. Header,1, Detail, * only).

Regrads

Raj

santosh_k3
Active Participant
0 Kudos

Hi raj,

thanks for u r reply,

As far as i know,

If we specify more than one structure and unbounded for one structure , there is a need of Keyfield.

As u said

>>>It would have not required if there was no trailer record. i.e. Header,1, Detail, *

But in this case also we might require Keyfield , if i am not wrong.

So , In my case as mentioned above

i would require a keyfield in the Source structure

which needs to identify Header,Data,Trailer records

Ex:

Keyfieldname : Identifier

Header.keyFieldValue : H

Data.keyFieldValue : D

Trailer.keyFieldValue : T

Correct me if i am wrong?

Thanks

Sai

Former Member
0 Kudos

Hi Sai,

> As far as i know,

> If we specify more than one structure and unbounded for one structure , there is a need of Keyfield.

if both the structure is 1:1 , then also u need key field.

Keyfieldname : Identifier
Header.keyFieldValue : H
Data.keyFieldValue : D
Trailer.keyFieldValue : T
Correct me if i am wrong?

it should be


Header.fieldNames : Identifier,...,
Header.keyFieldValue : H
Data.fieldNames:Identifier,....
Data.keyFieldValue : D
Trailer.fieldNames : Identifier,....
Trailer.keyFieldValue : T

Regards

Biplab Das

santosh_k3
Active Participant
0 Kudos

Hi biplab,

Ya, Thanks.

I want to get it confirm that

Is there a way that i can acheive without keyfieldname,values.

Thanks

Sai

Former Member
0 Kudos

Hi Sai,

Yes there are different ways you can do it.

1) create a simple data type with one field in it

DT_input
....Records 1...unbounded
.......Data   1.1

Records.fieldNames: Data
Records.fieldSeperator:'0'
Records.endSeparator:'nl'

u need to do 2 lelev message mappng, in the first message maping write a logic to sagrigate the Header detail and trailer.

2) If you are confortable in Java....read the input file as binary. using java mapping construct the input xml.

santosh_k3
Active Participant
0 Kudos

Hi biplab,

Thanks for ur suugestions

keep going...

Thanks

Sai

Answers (1)

Answers (1)

former_member191435
Contributor
0 Kudos

Hi Sai,

Its not mandatory to define key field in structure.

If u want to use key field need to use in fcc add key field in fieldnames list as a last field. then use below 2 parameters

Data.keyFieldInStructure ignore

Data.missingLastfields ignore

Ur receiver parameters should be:

Recordset Structure: Header,Data,Trailer

Header.fieldSeparator |

Header.fieldNames give ur names

Header.endSeparator 'nl'

like that for data and trailers.

Please let me know if u face an issue.

Thanks,

Enivass