Grep for string, but within mentioned bounds

Hi,

I've been trying to filter a file which has several repetitions of lines which looks as follows:

('hello
My name is
jamie
blabla
xyz>>)

Each line has different values in them. I want grep or awk or sed to treat everything within the (' and >>) as one line and then filter for a single word, for example jamie.

Any ideas how to do this?

PS:

I had tried a solution based on the following awk '/START:/{if (NR!=1)print "";next}{print $0}END{print "";} . However, the output still seems to be in separate lines...

I above gives me a solution as follows:

My name is
jamie
blabla
xyz>>)

My name is
joan
blabla
blabla
xyz>>)

Is there an easy way to merge lines not separated by a blank line into a single line?
Thanks.

Please be way more detailed and specific! Are those records separated by a blank line? What should the output look like?

Based on wild guesses, I came up with

awk '{X = X FS $0} />>\)/ {if (X ~ "jamie") print X; X = ""}' file
 ('hello My name is jamie blabla xyz>>)

Does this satisfy your request?

awk -vRS=  '{gsub(/\n/, " ")}1' INPUTFILE