I am working on reading .BAI2 files and processing transaction records using java. I have been exploring various options like reading and parsing .BAI2 file using plain java file IO, using spring batch etc. But i am finding the .BAI2 file structure fairly complex and not being able to get it to work correctly. Just wanted to know the opinions/thoughts if there are any standard tools or ways to read .BAI2 files using java. And if it can be achieved using spring batch. Thanks in advance.
.BAI2 is an industry standard format used by the banks. Below is the one truncated example:-
01,021000021,CST_USER,110520,1610,1627,,,2/
02,CST_USER,089900137,1,110509,1610,,2/
03,000000370053368,USD,010,782711622,,,015,7620008 12,,,040,760753198,,/
88,043,760000052,,,045,760010026,,,050,760000040,, ,055,760000045,,/
88,057,254419300,,,063,2000786,,,072,743172,,,073, 10000,,,074,1257614,,/
88,075,0,,,100,272765847,4,,140,288225,1,,170,1932 141,1,,230,270542100,1,/
88,390,3381,1,,400,293476657,478,,470,39057357,477 ,,530,254419300,1,/
16,165,288225,S,288225,0,0,1296942968TC,/
88,ORIG CO NAME= CABINET,ORIG ID=KAGIRO,DESC DATE=110509,ENTRY DESCR=G
88,IRO CRED,ENTRY CLASS=CCD,TRACE NO=021000026942968,ENTRY DATE=110509,IND ID N
88,O=KCAGIRO,IND NAME= CABINET
16,175,1932141,S,123432,551095,1257614,5070689876, ,/
16,249,270542100,S,270542100,0,0,1262000098XN,31Y9 957018126/
88,REMARK=RETURN OF PRINCIPAL - END-OF-DAY SWEEP REPURCHASE AGREEMENT.
The 88 records are optional additional continuation records, that can follow 03 or 16 records. The records are grouped, you could have multiple 03's for the 02 and multiple 16's for the 03 as well as the multiple 88's.