cancel
Showing results for 
Search instead for 
Did you mean: 

Trailer record in FCC

Former Member
0 Kudos

Hi All,

I want to pick up file by using FCC. The structure of file is as follows:

abbcccddddeeeee

abbcccddddeeeee

.

.

.

TRzzzxxyw

(First lines are multiple records)

Here the last record is Trailer record which starts with 'TR' always. With first record i know how to handle it by using fieldFixedLengths parameters.

But how can i pick up trailer record which will always start with 'TR'?

Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

Shabarish_Nair
Active Contributor
0 Kudos

first of all you will require a keyfield. So try to find out a keyfield for your records.

for example you first multiple records have abb as a key field and the trailer can have TR as the keyfield.

After that its normal content conversion and u will have to use fixedfieldlengths.

Ref:

Sender -

/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1

/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2

/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30

/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file

/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter -

TAB delimited

/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns

/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem

/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter

Receiver-

/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion

Former Member
0 Kudos

Hi Thanks for ur reply.

I have identified Keyfields.

In my record say keyfield is <b>EMP_ID</b> and in my trailer Key field is <b>Key</b>(Which contains first 2chars 'TR').

I set all the required parameters like fieldFixedLengths, fieldNames for both record and trailer.

but for my first Keyfield EMP_ID the value is not fixed so i have not entered <b>keyFieldValue</b> for it whereas for trailer i have entered <b>keyFieldValue</b> as "TR".

but how should i specify both keyfields in <b>Key Field Name</b> field?

In the blog /people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30 key filed name is <b>KF</b> but it is not specified in any of the field names parameter.

Can you please elaborate more on this?

thanks

nisarkhan_n
Active Contributor
0 Kudos

in this blog since the key field name is 1 field he has mentioned in that option...suppose you want to put 2 fields refering to two rows of data...

row1.keyfieldname == fieldname1

row1.keyfieldvalue=="vakue"

row2.keyfieldname==fieldname2

row2.keyfieldvalue="value"

try entering this way....

Former Member
0 Kudos

Are you using the key field value to identifying the structure in file or only for trailer recird u r using the key field.

Thnx

Chirag