Hello, I've written a script in korn shell which does the following:
I’ve got a process that’s pulling data from a database via middleware but missing odd records. The only apparent way of checking is via a log file which for every new record increments by one, so something like:
4010203040
4010203041
4010203042
4010203043
4010203044
4010203045
4010203046
4010203047
4010203048
4010203049
When I get missing records the log file looks something like:
4010203040
4010203041
4010203043
4010203044
4010203047
4010203048
4010203049
Looking at it manually is clear which records are missing but the log file can contain hundreds of thousands of records. What I’ve been doing is splitting the file into 10000 records and doing a simple sum to check if the expected number of records is right based on last record – first record. This works okay and is fast but the bit to identify which records are missing in each file is taking ages to run
Could anyone provide a clue to the fastest utility to trawl through a file and highlight the missing records when each number in the sequence is supposed to be incremented by 1 ?
Cheers
Rob
I’ve got a process that’s pulling data from a database via middleware but missing odd records. The only apparent way of checking is via a log file which for every new record increments by one, so something like:
4010203040
4010203041
4010203042
4010203043
4010203044
4010203045
4010203046
4010203047
4010203048
4010203049
When I get missing records the log file looks something like:
4010203040
4010203041
4010203043
4010203044
4010203047
4010203048
4010203049
Looking at it manually is clear which records are missing but the log file can contain hundreds of thousands of records. What I’ve been doing is splitting the file into 10000 records and doing a simple sum to check if the expected number of records is right based on last record – first record. This works okay and is fast but the bit to identify which records are missing in each file is taking ages to run
Could anyone provide a clue to the fastest utility to trawl through a file and highlight the missing records when each number in the sequence is supposed to be incremented by 1 ?
Cheers
Rob