cancel
Showing results for 
Search instead for 
Did you mean: 

file adapter..strange requirement..is it possible in XI?

Former Member
0 Kudos

Hi Guys,

I have searched sdn a lot..but have nt seen this kinda requirement before..

sender fie adapter files will be compare two files in a prticular folder by say field1 and the differences between the two files is 'x'. If the delta > 30% of the total ,and the date difference between the 2 files is less than 3 days then the new file will be treated as incorrect and then correct one will be procseeed...

Is thi possible in XI?...

Pls throw in ur thoughts on this

Regards

Accepted Solutions (1)

Accepted Solutions (1)

former_member183910
Participant
0 Kudos

Hi Ibrahim,

If you are using FTP and PI is installed on unix box, you can use "run operating system command" option in File adapter. This option needs a unix script to be executed. You can put all your business logic in this script.

Ofcource, you need an unix expert consultant.

Thanks,

Sandeep Maurya

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

It seems quite weird but you try it by writing EJB module where in you hav to write code in Java to do those manipulations and deploy that in the server.So before processing the file by the file adapter the EJB module will be called.Try it out it .

Thanks,

Arijit Guha

prateek
Active Contributor
0 Kudos

There is no standard way to achieve this in PI. But if you want this to be handled in PI, you need to pick both the files and use it in PI may be using BPM. Then only you may perform so many checks on field and filename.

Regards,

Prateek

Former Member
0 Kudos

You can write a program that does just that and call the program before picking up the messages (in Run Operating System Command Before Message Processing)

Former Member
0 Kudos

Strange really , not to my knowledge.

Former Member
0 Kudos

Ibrahim,

Yes it is a strange requirement. Well we can compare the files in java. See this code:

http://blog.taragana.com/index.php/archive/java-program-compare-two-text-files/

It compares and gives the difference in between the files. But since you want the percentage > 30 I dont think we can do either in java. For getting percentages probably a reporting tool can help you.

Your second option also you can achieve it in java. So if you come up with some logic which indicates the percentage then your requirement can be done using java.

Regards,

---Satish

agasthuri_doss
Active Contributor
0 Kudos

Ibrahim,

>sender fie adapter files will be compare two files in a prticular folder by say field1

To my knowledge NO.

Cheers

Agasthuri