Search in specific position and print the whole line

I have two files abc.dat and sant.dat (Big file 60k rows)
for every line's 1,4 of abc.dat need to seach if this is present on 28,4 of sant.dat every line.

if its present the output needs to go to bde.dat

Example:

contents abc.dat

aaaa
bbbb
cccc
dddd

contents sant.dat

this is a new messagexxxx  aaaa
this is not a new message  bbbb
this is not a new message  xxxx

Output

this is a new messagexxxx  aaaa
this is not a new message  bbbb

Actually, it should be 27,4 in your example...

awk 'NR==FNR{_[substr($0,1,4)];next}{for(i in _){if(i==substr($0,27,4)){ print $0}}}' abc.dat sant.dat

i am getting the below error...

$ awk 'NR==FNR{_[substr($0,1,4)];next}{for(i in _){if(i==substr($0,27,4)){ print $0}}}' abc.dat sant.dat
awk: _ is not an array
 record number 1

Try with nawk instead of awk

works fine now...Thanks a lot for all the help.