Skip to Content
0
Jul 26, 2016 at 06:36 AM

Merging Payment Response Files coming from SWIFT

139 Views

Hello Everyone,

I have one unique requirement. Payroll response files from Bank will be dropped in one of the file servers, from this file server, the files need to be merged and then mapped to a standard proxy in ECC.

There will be 2 files coming from Bank and these files must be merged and mapped to the proxy structure. Below will be the filename pattern and along with these there will be other files too in the folder and only these two files need to be merged and mapped to the proxy -

Company.OSP.A100000.2000.FILEACT.PRRES.SNLsomeRandomNumber

Company.OSP.S100000.2001.FILEACT.PRRES.SNLsomeRandomNumber

The filename differs based on the things marked in bold. Other than those the filenames are same for both of them. Additional files, will not be helpful as it needs the exact filename, due to SNLsomeRandomNumber, the file extension also becomes unique.

Another issue is, the folder where the above files will be present will consist of other files too, which needs to be merged.

For example - The folder file can consist of below files -

Company.OSP.A100000.2000.FILEACT.PRRES.SNLsomeRandomNumber


Company.OSP.S100000.2001.FILEACT.PRRES.SNLsomeRandomNumber


Company.OSP.A200000.3000.FILEACT.PRRES.SNLsomeRandomNumber


Company.OSP.S200000.3001.FILEACT.PRRES.SNLsomeRandomNumber


Company.OSP.A300000.4000.FILEACT.PRRES.SNLsomeRandomNumber


Company.OSP.S300000.4001.FILEACT.PRRES.SNLsomeRandomNumber


And my requirement is to merge only the specific two files based on the payment number, in the above example files the payment number is 100000, 200000, 300000


So in the output, i have these files to be merged separately -


Company.OSP.A100000.2000.FILEACT.PRRES.SNLsomeRandomNumber / Company.OSP.S100000.2001.FILEACT.PRRES.SNLsomeRandomNumber - To be merged as One file


Company.OSP.A200000.3000.FILEACT.PRRES.SNLsomeRandomNumber / Company.OSP.S200000.3001.FILEACT.PRRES.SNLsomeRandomNumber - To be merged as One file


Company.OSP.A300000.4000.FILEACT.PRRES.SNLsomeRandomNumber / Company.OSP.S300000.4001.FILEACT.PRRES.SNLsomeRandomNumber - To be merged as One file


Kindly help me out on how to achieve this, completely stuck up with this issue.

Regards,

Nitin