by jaganmoni » Mon Sep 01, 2014 5:20 pm
Please see below for example:
File1: The Kay value from position 19 to 45 is '005145151513532007606058527'
----+----1----+----2----+----3----+----4----+----5----+----6
********************************* Top of Data **************
CISPLT1 201408272014082720392823 TOE3JH06
00760241100ADDSPL00051451515135320076060585271140827 0183225
00760241140ADDSPL00051451515135320076060585271140827 0183225
00760241160ADDSPL00051451515135320076060585271140827 0183225
00760241162ADDSPL00051451515135320076060585271140827 0183225
00760241164ADDSPL00051451515135320076060585271140827 0183225
00760241168ADDSPL00051451515135320076060585271140827 0183225
00760241180ADDSPL00051451515135320076060585271140827 0183225
00760241300ADDSPL00051451515135320076060585271140827 0183225
00760241310ADDSPL00051451515135320076060585271140827 0183225
00760241320ADDSPL00051451515135320076060585271140827 0183225
00760241330ADDSPL00051451515135320076060585271140827 0183225
00760241340ADDSPL00051451515135320076060585271140827 0183225
00760241400ADDSPL00051451515135320076060585271140827 0183225
00760241420ADDSPL00051451515135320076060585271140827 0183225
File2: The Kay value from position 19 to 45 is '005145151513532007606058527'
----+----1----+----2----+----3----+----4----+----5----+----6
00760241100CHGSPL00051451515135320076060585271140827,0183225
00760241162CHGSPL00051451515135320076060585271140827 0183225
00760241164CHGSPL00051451515135320076060585271140827 0183225
00760241168CHGSPL00051451515135320076060585271140827 0183225
00760241180CHGSPL00051451515135320076060585271140827 0183225
00760241300CHGSPL00051451515135320076060585271140827 0183225
00760241310CHGSPL00051451515135320076060585271140827 0183225
Note: In the above example only two records from position 9 to 11 should have either 300 or 310 or 320 or 330 ore 340 in both File-1 and File-2
The following two records should be excluded from File-1
00760241310ADDSPL00051451515135320076060585271140827 0183225
00760241320ADDSPL00051451515135320076060585271140827 0183225
So the final output will be as below
Output:
CISPLT1 201408272014082720392823 TOE3JH06
00760241100ADDSPL00051451515135320076060585271140827 0183225
00760241140ADDSPL00051451515135320076060585271140827 0183225
00760241160ADDSPL00051451515135320076060585271140827 0183225
00760241162ADDSPL00051451515135320076060585271140827 0183225
00760241164ADDSPL00051451515135320076060585271140827 0183225
00760241168ADDSPL00051451515135320076060585271140827 0183225
00760241180ADDSPL00051451515135320076060585271140827 0183225
00760241300ADDSPL00051451515135320076060585271140827 0183225
00760241330ADDSPL00051451515135320076060585271140827 0183225
00760241340ADDSPL00051451515135320076060585271140827 0183225
00760241400ADDSPL00051451515135320076060585271140827 0183225
00760241420ADDSPL00051451515135320076060585271140827 0183225