The phrase is, indeed, used in both books. It's used several times in
Slapstick, and at least once in
Slaughterhouse 5.
"Go take a flying fuck at a rolling donut," murmured Paul Lazzaro in his azure nest. "Go take a flying fuck at the moon."
- SH 5
Philip Jose Farmer, as
Kilgore Trout, uses a
derivative of this
invective in
Venus on the Half-shell - "Go take a flying fuck at a rolling
karass! Go take a flying fuck at the
Dupraaaaaaass!
1"
Just some more "Kilgore Trout is Kurt Vonnegut" confusion, which probably
thrilled Vonnegut.
1 kurass and duprass are tenets of Bokonon from Vonnegut's Cat's Cradle.