cat is redundant in cat | grep chain. It is a sign of newbies copy-pasting other newbies.
grep (or any other tool) could accept the input just fine without cat:
grep PATT <<EOF
...
EOF
Shell grammar allows specification of IO redirection before or after the command:
<<EOF grep OK - <(echo "OK 2")
OK 1
EOF
It prints (searching stdin from HERE-document, specified by -; then searching named pipe from process substitution, specified by <()):
(standard input):OK 1
/dev/fd/63:OK 2
You could have as many HERE-doc as you wish, just forward the data to different file descriptors, with duplicating redirection the latest "wins" (below prints OK3):
<<EOF1 <<EOF2 cat <<EOF3
OK1
EOF1
OK2
EOF2
OK3
EOF3
Example of opening stream 3, writing data to it and reading it later (notice syntax <&N for redirecting descriptor N to descriptor 0, which is stdin):
exec 3<<EOF
> OK
> EOF
cat <&3
OK
There is a possibility to refer to file descriptors of the process via proc file system /proc/self/fd/N (make sure you understand what self is when forks processes!):
<<EOF cat | cat - /proc/self/fd/3 3<<EOF3 | cat - /proc/self/fd/4 4<<EOF4
> OK 1
> EOF
> OK 2
> EOF3
> OK 3
> EOF4
OK 1
OK 2
OK 3
EOFline.