Negate gawk search

Hi,
I am using the under-noted script to search the "MYPATTERN" in MYFILE and print that block of lines containing the pattern starting with HEADER upto FOOTER.

Please help me what to put in script to negate the search i.e. not to print those blocks meeting the search criteria.

gawk -v search='MYPATTERN' '
/HEADER/,/FOOTER/ {
block = (block ? block ORS : "") $0;
}
/FOOTER/ {
if (block ~ search)
print block;
block = "";
} ' <MYFILE>

Thnx in advance.

Hi ,
in u r code :

if (block !~ search)

try with this