Question
-
Topic
-
Compare data output file with a list and add a flag
LockedI have a large fixed-width data file auto-generated by a database for printing delivery labels that’s full of tags and flags for the printers. I need to compare the account numbers within the file to a list in a second file and add +14D to one of the fields for those accounts found in the list. I want to use vbs as it’s what I know and it will be automated with a 3rd-party monitoring product. So a line beginning %2403 needs a flag inserting at position 26(REPLACING 3 spaces to keep the field lengths correct) ONLY where the account number is in the list.
I’m a bit stumped by this one as to the most efficient way to read and compare the 2 files as speed is of the essence here.
EDIT> I think what I’m going to look at is since the customer code is in the file name, I’ll have an ini file with the customer code as the section heading and account codes below it – so for example:
[HLCCK]
123456
654321
789456
987654[BBCMY]
3336662
etcThen all I need do is extract the cust. code from the file name then only look at those few account numbers, but still not sure how to do it.