cancel
Showing results for 
Search instead for 
Did you mean: 

File Content conversion at the sender adapter without Key field

Former Member
0 Kudos

Hi All,

I have a requirement ....We are using Message Transform Bean at the sender adapter (we are not going for FCC as we are tranforming a decryption) ..its is a flat file...

we dnot have a key field for one of the node .....we have total 5 nodes under parent node and one of the node does not have key field ....

NOTE: I guess we have to do either Java mapping or XSLT ..but not getting proper weblogs with program...

and not well versed with coding...i got few codes which were either not fulfilling requiremment or they use stream tranformation where it is decaprecated in NWDS and does not allow to compile it properly .

Can somebody get me a code for Java which uses Abstract tranformation ...which can full fill below requirement

parent node

Node1

node 1a

node 1b

Node 2

Node 3

Input Flat file is in below format

example:

Employee Headre Flat files

Employee Detail Flat Files(this repeates numerous times as much as number of employees)

Employee Trailer Flat Files

Loan Headre Flat files

Load Detaisl Flat Files (this repeates numerous times as much as number of employees)

Loan Trailer Flat files

Assitance much appreciated thanks .

Regards

Kiran

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

When you have no key fields, how can you knw whether a line in the file is header, detail or trailer?

Former Member
0 Kudos

Hi Stefan,

Good day , Thanks for the update ,

we have the FS where in we have pre defined structure for this interface and when we confirmed this from the functional team we got an update that this will come as a NODE inside NODE 1 (i.e NODE 1a and NODE 1B) , we have not received the sample payload and sender system will send the Flat Files under NODE 1a and NODE 1b,

Its sure that we will receive the same structure .

Thanks for the interest.

Regards

Kiran

stefan_grube
Active Contributor
0 Kudos

I did not get this.

You said your source file is a plain text file.

So when you have no key fileds in your text file, you can you identify, which line is header, detail, trailer?

The XML structure after FCC is fixed. You cannot define the XML structure and do an FCC to match it, you have to do it the other way:

Do the FCC, see what is the output and define the structure based on that output.

Of course you can create any structure you like with a Java mapping or adapter module, but this is error prone, hard to maintain and monitor.

Former Member
0 Kudos

Hi Stefan,

Thanks for the input,

You are absolutely right,

But we have a sample file from the same interface which was running in 3.0 environment , but it din had Node 1a and Node 1b its a new addition and we are doing this in 7.1 environment ...

That sample file has all the key fields as this is new addition we donot have key fields for these two nodes....

Regards

Ravikiran

stefan_grube
Active Contributor
0 Kudos

I am totally lost with a statement like this:

> sender system will send the Flat Files under NODE 1a and NODE 1b

How can a flat file be under a node?

When your scenario is already running and you have to add new field or lines, then just do it like it was done for the existing fields and lines.

Former Member
0 Kudos

Hi Stefan,

I will rephrase the question i guess its communication gap...

1) we have an existing interface in 3.0..we are not copying the same interface to 7.1 as it was not according to standards and they are phasing out that system.

2) In 3.0 they are reading the Flat files under one record .. the structure is as follows:

Parent Node

Node

Row

They are reading all the flat files row by row.

and even in receiver they are reading in the similar fashion

3) In the current structure according to the FS we have to create a structure defined by them which is as below

Employee

Header

Details node 1

Details node 1a

Details node 1b

Trailer

Loan Header

Loan Detail

Loan Trailer

Receiver structure is

Employee

Node (this will have the receiver fields which is about 30 fields)

4) We have pulled a sample file from 3.0 for the existing interface as we din get the sample file for existing one in FS and Iam not sure whn are they gonna send it.

5) In the existing interface payload we have everything matching even the field lengths and postions and even key fields and key fields we got from the FS

6) problem is we donot have key fields for the Details node 1a and 1b even in FS or the existing payload and we got an update from the FS consultant that we will be receiving these fields but without keyfields...

see i donot have any problem taking out the details 1a and 1b out of the details header and create the structure ,,,,but the main issue is without key field we will not be able to generate the 1a and 1b nodes or read it in the FCC or MTB (i have to use MTB as we are decryting the file from the sender).

Or is there any other method apart from java mapping or module development to handle these files

stefan_grube
Active Contributor
0 Kudos

> 6) problem is we donot have key fields for the Details node 1a and 1b even in FS or the existing payload and we got an update from the FS consultant that we will be receiving these fields but without keyfields...

Tell FS consultant that the file must have a key field for every line.

Former Member
0 Kudos

Hi Stefan,

We have told them about the constraints of not having the key field, as the file is comming from third party vendors ,they will not change their system config to generate file just for us ..

This scenario is from third party FTP to ECC....'

so we have to try and alternative steps to handle these files ....thanks for the input

Regards

Kiran

Former Member
0 Kudos

Hi Kiran,

As stefan said your requirement cannot be fulfilled without keyfield for all your sub-structures.

The only question left is - do you know the exact occurrences of each of your substructures in the file?

ie; if you know that your header record occurs only once, detail node 1 records only twice..trailer occurs 4times in each file..so on..something like this, then you can specify the Recordset Structure with exact record occurrence.

eg: Employee,1,Header,2,Details node 1,3,Details node 1a,3,......

(if you enter * for any substructure or the sequence differs, then key field is MUST)

If your answer to the above question is 'NO' , you cannot achieve this without keyfield and normal FCC (no modules, java map etc).

Former Member
0 Kudos

Hi Nagarjuna,

Thanks for the interest,

As this is a delta entry , the occurence cannot be concluded, it can be one record on a particular day or multiple records ona given day,

The occurence is as follows:

Employee header occurence will be 0...1

Employee detail will reapeat numerous times for diffrnt employee so it is 0.....unbounded

Employee detail 1a will reapeat for each employee so it is 0..unbounded

employee detail 1b will also repeat for each employee so it is alos 0...unbounded

Infact we can handle this in Java mapping , but I need a java code as Iam not well versed with Java,

Thanks

Ravi

Answers (1)

Answers (1)

former_member207622
Contributor
0 Kudos

Hi Kiran ,

In this case what I would suggest is create a data type which has only one field in it say Records .

For the FCC give evrything unbounded ( Employeedetail * , header * )

Create an intermediate mapping between this source having one fiield ( all the data coming in single line into this field )

and target as the desired structure you want . then play around with your mapping ,, find out some rule , some transformation so that you can create your target structure .

then map this target structure to the ECC One's

I am not sure if this works or not , try and consult ur FS guy , if he can provide some clue

regards

Ninad

Former Member
0 Kudos

Hi Ninad,

Thanks for the update,

We are keeping that as the last option as it will go against our design standards, and hadling the row by row files and mapping them to target is very tedious..if anybody can help me out with Java code it will be great !!!!! thanks.

Regards

Ravikiran