I want a code/logic for the below COBOL code.
In a input file records are like below:
Code: Select all
212Q64 0000 0999 10
212Q64 1000 1999 11
212Q64 2000 2999 25
212Q64 3000 3999 16
212Q64 4000 4999 18
212Q64 5000 5999 31
212Q64 6000 6999 35
212Q64 7000 7999 12
212Q64 8000 8999 48
212Q64 9000 9999 66
The requirement is when the first 6 bytes of the account (212Q64 in the above example account number) is matching with the another file records of 6-bytes (which stated in column-1 above), then should check other last 4 bytes of account number from 212Q64-2121 is in which range(it belongs to 2000 2999 in the above example), then should pick it's corresponding value as 25...
Could you please tell me how to do it?
I have written matching logic thing already, but I need the other part of 4 bytes checking and pick the last column value