Dog vomit happens, and sometimes we don't discover it until it's old enough to be carbon dated. Try one of the following fixes:
Oxiclean (found at Costco, Walmart and most grocery stores) is nothing short of miraculous. Mix it with water as directed and apply to the spot; rinse thoroughly. One warning: It cleans so well that the clean spot might make the rest of carpet look dirty. After you've cleaned a spo, follow up with a steam vac to make the surrounding areas match;
Soak up the stain with paper towels. Add water to the stain to help loosen the dry particles, and soak up again. Add baking soda to absorb the excess water and organic material (read: vomit) Vacuum up and repeat with water and baking soda at least 2 more times. This will elimate the odors and lift the stains as much as possible until the carpet can be shampooed;
Sprinkle Borax (20 mule team) laundry additive powder on top of the spot (be generous). It absorbs really well and is inexpensive. After 24 hours, sweep the now-yellow Borax into a dustpan and vacuum the remaining borax up.
If the vomit is already dried, spray with water, sprinkle the Borax on top and follow the steps above;
"Spot shot" works most of the time. Spray the product on the spot, scrub lightly, then use a shop vac to vacuum dry the area. Repeat as many times as needed to lift the spot;
Be aware, however, that Spot Shot is petroleum based and even a tiny bit of vomit left in the carpet after cleaning will attract dirt to that one spot