Skip to Content
0
Former Member
Jun 15, 2009 at 03:00 AM

Mapping Help---

32 Views

Hi Experts,

I am doing file to jdbc interface. My file contains two types of records, like Header and Trailer records.

Header Records

DD33,0809201034,000000000000,04027S,Test,SIC

DD33,0809201034,000000000000,04028S,Test,STC

DD33,0809201034,000000000000,04029D,Test,STC

XD46,0809201034,000000000000,04027S,Test,SIC

XD46,0809201034,000000000000,04028S,Test,STC

SD56,0809201034,000000000000,04029D,Test,STC

DD33,0809201034,000000000000,04029D,Test,STC

DD33,0809201034,000000000000,04029D,Test,STC

SD56,0809201034,000000000000,04029D,Test,STC

SD56,0809201034,000000000000,04029D,Test,STC

SD56,0809201034,000000000000,04029D,Test,STC

XD46,0809201034,000000000000,04027S,Test,SIC

XD46,0809201034,000000000000,04028S,Test,STC

Trailer Records

DD33,5 - No of appearance in the header records.

XD46,4 - No of appearance in the header records

SD56,4 - No of appearance in the header records

My requirement is, i need to compare both header and trailer records. In the trailer records above DD33,5, here 5 denotes, the no of times that DD33 records appears in the header record. Both should tally, otherwise i need to skip this DD33 and move to XD46 and check for the no of appearance in the header record with the trailer value. Like this i need to compare both header and trailer.

Experts pls advise me how to execute this mapping.

Waiting for your advise......

Thanks in advance.

Regards

Mani.