Can someone please assist me with the following:
I have two files, each containing records containing debit and credit transactions. Each files debits and credits must be tallied up separately and the net amount displayed. So for example, for FILE A, Total Debits = xxxxx, Total Credits = yyyyy, Net amount = xxxx-yyyyy
FILE B, Total Debits = aaaaa, Total Credits = bbbbb, Net amount = aaaaa-bbbbb
File A is as follows:
1...................52 <=== column
RECFM=FB, LRECL=180, BLKSIZE=27900 <=== File attributes
0460820901260901260901260901260000010001SAMEDAY
6019490501949001172608200000125500562005846459300000
6019490501949001172608200000225210550300063092300000
6019490501949001172608200000302000900070013519300000
6019490501949001172608200000405553400043121381300000
6019490501949001172608200000523013755071181959300000
6019490501949001172608200000644011003492824302300000
6019490501949001172608200000732334504054478516300000
6019490501949001172608200000825500562005846459300000
Column 52: defined as PIC 9(09)V99
Amount
Column 1: defined as PIC 99
20 ==> Debit
60 ==> Credit
File B is as follows:
81.........................108........................135 <=== column
RECFM=FB, LRECL=310, BLKSIZE=27900 <=== File attributes
01000000146905930400000469114372009012600000000000000+0000000370136
01000000151102978100000511114372009012600000000000000+0000000370136
01000000194900007900000949114372009012600000000000000+0000000284870
01000000197060799800000970114372009012600000000000000+0000000370136
01000000197060799800000970114372009012600000000000000+0000000370136
01000000145403413000000454114372009012600000000000000+0000000370136
01000000190410948900000904114372009012600000000000000+0000000370136
01000000118601906900000186114372009012600000000000000+0000001511811
01000000149710233200000497114372009012600000000000000+0000000370136
01000000103633819300000036114372009012600000000000000+0000000370136
01000000190741548300000907114372009012600000000000000+0000000370136
01000000168607544800000686114372009012600000000000000+0000000370136
Column 108: defined as PIC 9
1 ==> Debit
6 ==> Credit
Column 135: defined as PIC 9(11)V99
Amount
Thanks.
Aadil