Editing all files inside folders and updating pos 88-94 with continuous numbering.

Here is expected output:-
For each file with following file name pattern we need to look at position 1 inside first file matching our search criteria if first letter of the line is 5 then position 88-94 will be 0000001 then look for line immediately after 5 which starts with i.e. position 1 = 8 then position 88-94 will be 0000001 for that line starting with 8. Now again look first line start with 5, if matches then set position 88-94 will be 0000002. Now again look for line starting with 8 and set position 88-94 will be 0000002. Process this untill end of First file. Now assume last occurrence of line starting with 8 have position 88-94 = 0000010 then Look for occurrence of 5 in position 1 inside Second file If found then set position 88-94 will be 0000011, Also find line staring with 8 immediately and set position 88-94 will be 0000011.Continue numbering this until we are done with file matching our file search criteria.
Expected Output:-
File 1 name = ABCDEFG1234567_mm-dd-yy_hh_mm_ss123.data

Position:-      1234567890..............................................94
                101 101000048 CITY        ABCDEF FILE BC TOMJE                                    
                5220ABCDEF PQRSTUVWX   2342342345PPDAB            0000001
                101 101000048 CITY        ABCDEF FILE BC TOMJE        12
                8220000005005550001000000000000                   0000001
                5225ABCDEF PQRSTUVWX 121029080319303110           0000002 
                11 101000048 CITY        ABCDEF FILE BC TOMJE        13
                820000005005550001000000000000                    0000002  

File 2 name = ABCDEFG1234567_mm-dd-yy_hh_mm_ss145.data

Position:-      1234567890..............................................94
                101 101000048 CITY        ABCDEF FILE BC TOMJE                                    
                5220ABCDEF PQRSTUVWX   2342342345PPDAB            0000003
                101 101000048 CITY        ABCDEF FILE BC TOMJE        12
                8220000005005550001000000000000                   0000003
                5225ABCDEF PQRSTUVWX 121029080319303110           0000004 
                11 101000048 CITY        ABCDEF FILE BC TOMJE        13
                820000005005550001000000000000                    0000004  

File 3 name = ABCDEFG1234567_mm-dd-yy_hh_mm_ss167.data

Position:-      1234567890..............................................94
                101 101000048 CITY        ABCDEF FILE BC TOMJE                                    
                5220ABCDEF PQRSTUVWX   2342342345PPDAB            0000005
                101 101000048 CITY        ABCDEF FILE BC TOMJE        12
                8220000005005550001000000000000                   0000005
                5225ABCDEF PQRSTUVWX 121029080319303110           0000006 
                11 101000048 CITY        ABCDEF FILE BC TOMJE        13
                820000005005550001000000000000                    0000006  

File 4 name = ABCDEFG1234567_mm-dd-yy_hh_mm_ss189.data

Position:-      1234567890..............................................94
                101 101000048 CITY        ABCDEF FILE BC TOMJE                                    
                5220ABCDEF PQRSTUVWX   2342342345PPDAB            0000007
                101 101000048 CITY        ABCDEF FILE BC TOMJE        12
                8220000005005550001000000000000                   0000007
                5225ABCDEF PQRSTUVWX 121029080319303110           0000008 
                11 101000048 CITY        ABCDEF FILE BC TOMJE        13
                820000005005550001000000000000                    0000008

Here is the Code which find the files matching criteria:-

TS=`date +"%m-%d-%Y"`| for fname in `find . -name "ABCJmdmfbsjop???????_${TS}*.data"`
do    # Matching File Processing Code.

Show the input you have and the output you want, please.

Just now I've updated four files which are there is that folder. I need to update these files with above criteria.
Thanks,
-Lance

That's the input you want, now show the output you want.

Here is expected output:-
For each file with following file name pattern we need to look at position 1 inside first file matching our search criteria if first letter of the line is 5 then position 88-94 will be 0000001 then look for line immediately after 5 which starts with i.e. position 1 = 8 then position 88-94 will be 0000001 for that line starting with 8. Now again look first line start with 5, if matches then set position 88-94 will be 0000002. Now again look for line starting with 8 and set position 88-94 will be 0000002. Process this untill end of First file. Now assume last occurrence of line starting with 8 have position 88-94 = 0000010 then Look for occurrence of 5 in position 1 inside Second file If found then set position 88-94 will be 0000011, Also find line staring with 8 immediately and set position 88-94 will be 0000011.Continue numbering this until we are done with file matching our file search criteria.

File 1 name = ABCDEFG1234567_mm-dd-yy_hh_mm_ss123.data

Position:-      1234567890..............................................94
                101 101000048 CITY        ABCDEF FILE BC TOMJE                                    
                5220ABCDEF PQRSTUVWX   2342342345PPDAB            0000001
                101 101000048 CITY        ABCDEF FILE BC TOMJE        12
                8220000005005550001000000000000                   0000001
                5225ABCDEF PQRSTUVWX 121029080319303110           0000002 
                11 101000048 CITY        ABCDEF FILE BC TOMJE        13
                820000005005550001000000000000                    0000002  

File 2 name = ABCDEFG1234567_mm-dd-yy_hh_mm_ss145.data

Position:-      1234567890..............................................94
                101 101000048 CITY        ABCDEF FILE BC TOMJE                                    
                5220ABCDEF PQRSTUVWX   2342342345PPDAB            0000003
                101 101000048 CITY        ABCDEF FILE BC TOMJE        12
                8220000005005550001000000000000                   0000003
                5225ABCDEF PQRSTUVWX 121029080319303110           0000004 
                11 101000048 CITY        ABCDEF FILE BC TOMJE        13
                820000005005550001000000000000                    0000004  

File 3 name = ABCDEFG1234567_mm-dd-yy_hh_mm_ss167.data

Position:-      1234567890..............................................94
                101 101000048 CITY        ABCDEF FILE BC TOMJE                                    
                5220ABCDEF PQRSTUVWX   2342342345PPDAB            0000005
                101 101000048 CITY        ABCDEF FILE BC TOMJE        12
                8220000005005550001000000000000                   0000005
                5225ABCDEF PQRSTUVWX 121029080319303110           0000006 
                11 101000048 CITY        ABCDEF FILE BC TOMJE        13
                820000005005550001000000000000                    0000006  

File 4 name = ABCDEFG1234567_mm-dd-yy_hh_mm_ss189.data

Position:-      1234567890..............................................94
                101 101000048 CITY        ABCDEF FILE BC TOMJE                                    
                5220ABCDEF PQRSTUVWX   2342342345PPDAB            0000007
                101 101000048 CITY        ABCDEF FILE BC TOMJE        12
                8220000005005550001000000000000                   0000007
                5225ABCDEF PQRSTUVWX 121029080319303110           0000008 
                11 101000048 CITY        ABCDEF FILE BC TOMJE        13
                820000005005550001000000000000                    0000008

Here is the Code which find the files matching criteria:-

TS=`date +"%m-%d-%Y"`| for fname in `find . -name "ABCJmdmfbsjop???????_${TS}*.data"`
do    # Matching File Processing Code.

Your input and output data is missing a whole lot of columns. It also contains two leading tabs which may or may not actually be part of your data -- quite unclear. If I make a program that works with your 'data', it is guaranteed to not work for you.

This is probably why you've gotten so few replies.

Is this more like what your data actually looks like? (exclude the first line)

1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234
101 101000048 CITY        ABCDEF FILE BC TOMJE
5220ABCDEF PQRSTUVWX   2342342345PPDAB                                                 0000001
101 101000048 CITY        ABCDEF FILE BC TOMJE                                             12
8220000005005550001000000000000                                                        0000001
5225ABCDEF PQRSTUVWX 121029080319303110                                                0000002
11 101000048 CITY        ABCDEF FILE BC TOMJE                                             13
820000005005550001000000000000                                                         0000002

Also, do you realize that your file-finding code will not find these files in any particular order? It will be arbitrarily determined by which is found first in the filesystem, not by their filenames.

I am processing input files which consist of 94 characters per line.
Your representation of input file data is correct. Every file consists of 94 characters per line.File name = ABCDEFG1234567_mm-dd-yy_hh_mm_ss123.data.
I agree my file finding code will select file based on arbitrarily determined by which is found first in the file system. I think that code can be modified to find file based on date and early HH:MM:SS time present in file.