Could you please help me with sort card for below requirement?
File-1
----+----1----+
TEST 1111
AAAAAAAAAAAAA
BBBBBBBBBBBBB
TEST 2222
CCCCCCCCCCCCC
CCCCCCCCCCCCC
TEST 3333
DDDDDDDDDDDDD
EEEEEEEEEEEEE
TEST 2222
FFFFFFFFFFFFF
GGGGGGGGGGGGG
TEST 4444
HHHHHHHHHHHHH
TEST 3333
TEST 1111
AAAAAAAAAAAAA
BBBBBBBBBBBBB
TEST 2222
CCCCCCCCCCCCC
CCCCCCCCCCCCC
TEST 3333
DDDDDDDDDDDDD
EEEEEEEEEEEEE
TEST 2222
FFFFFFFFFFFFF
GGGGGGGGGGGGG
TEST 4444
HHHHHHHHHHHHH
TEST 3333
File-2
----+----1
1111
2222
3333
4444
1111
2222
3333
4444
Expected output
----+----1----+
TEST Z1111
AAAAAAAAAAAAA
BBBBBBBBBBBBB
TEST Z2222
CCCCCCCCCCCCC
CCCCCCCCCCCCC
TEST Z3333
DDDDDDDDDDDDD
EEEEEEEEEEEEE
TEST Z2222
FFFFFFFFFFFFF
GGGGGGGGGGGGG
TEST Z4444
HHHHHHHHHHHHH
TEST Z3333
TEST Z1111
AAAAAAAAAAAAA
BBBBBBBBBBBBB
TEST Z2222
CCCCCCCCCCCCC
CCCCCCCCCCCCC
TEST Z3333
DDDDDDDDDDDDD
EEEEEEEEEEEEE
TEST Z2222
FFFFFFFFFFFFF
GGGGGGGGGGGGG
TEST Z4444
HHHHHHHHHHHHH
TEST Z3333
in normal text
----+----1----+
TEST Z1111
AAAAAAAAAAAAA
BBBBBBBBBBBBB
TEST Z2222
CCCCCCCCCCCCC
CCCCCCCCCCCCC
TEST Z3333
DDDDDDDDDDDDD
EEEEEEEEEEEEE
TEST Z2222
FFFFFFFFFFFFF
GGGGGGGGGGGGG
TEST Z4444
HHHHHHHHHHHHH
TEST Z3333
Key (1st to 4th position) of file-2 has to match with key of file-1(10th position to 14th position)
If key is matched output has to write with added āZā character(As highlighted in red color ) before key and rest has to copy as in file-1.
I am OK to have even in 2 or 3 steps -- Please help me.
Thanks
Kiran