Hi Everyone,
I'm somewhat new to perl and have been manually (visually) comparing a text import file consisting of a trailer that indicates the number of "records" that should be imported into an application. I then have to check a text "log/report" that indicates the actual Total Records imported ## into the system. I probably could have mulled through this one on my own but the caveat is there are three types of records (3 place holders in the trailer) and 3 corresponding "Total Records Imported :##" entries in the generated log/report. There is nothing unique to map to in the report except that the sequence will remain the same i.e. trailer1 placeholder will be the first "Total records imported :##" entry and trailer2 place holder will be the second "Total Records imported entry and so on". The "Total Records imported:##" and Trailer# place holder should be equal to one another (hence the visual checking :) I have searched hi and lo for help but am being pulled mostly to source code comparison utilities which doesn't seem to correlate to me needs. Any help would be much much appreciated!
Here is an example of the Trailer thread
T0000000000000018700000000011345000000000000000000000
(in terms of orientation it is the very last line in the record) Here is an example of the corresponding log/record
output: Total Records Processed: 187
I know from the trailer (Character space 18 to 11 is used for A records and the other number is the B Record or Character 33 to 28) so the first Total Record found in the log should be followed by 187 (A record) and the 2nd Total Record should correspond to the B record number). Ideally I would like to email myself either a successful or failure message.
Reformatted to match original input as best as could be determined by davido.
In reply to Need to compare import Trailer to Result Log by jwebste1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |