It may be something stuck in his throat. You will have to see if you can locate anything in the throat. If you do see something, take pliers or something simple and try to remove it if possible, but it is best if handled by your vet. Do not try using your hand to remove an item in the throat as you can be bit.
Dry heaves is also associated with bloat (Gastric Dilatation) which may or may not involve stomach torsion (twisted stomach). Common symptoms are attempts to vomit (usually unsuccessful) and may continue to try to vomit, dog just doesn't seem like themselves, a hunched up posture, anxiety and restlessness, a distended stomach that is tight like a drum, gums may be dark red in early stages and white or blue in later stages. These are the most common symptoms and the list goes on.
If you believe your dog has bloat they should be seen immediately. Simethicone products like gas-x may help while you take him into the vet.
You can read more on bloat here.
And it could just be an upset stomach in which case, you can try some pepcid or Zantac. Read about Pepcid dosages and usage information here: http://www.petplace.com/drug-library/famotidine-pepcid/page1.aspx
Zantac can be given to a dog at .25 to 1mg per pound every 8-12 hours. Read about usage here:
Sometimes coughing is described as gagging and with kennel cough it sounds almost like a cat with a hair ball or a goose honking. Here is a website with more information on kennel cough. http://www.thepetcenter.com/gen/kenc.html
Canine influenza is now becoming more prevalent and like it sounds it is a canine flu. Here is an excellent site on it.
If it is kennel cough or a cough, you will want to monitor your dogs condition looking for colored discharge from the nose or eyes, a productive cough (coughs stuff up), stops eating or lethargy. These are signs of a possible bacterial infection as well and my require antibiotics. If your dog appears to be having a difficult time breathing, you will need to see your Vet as some dogs dog get really sick with canine influenza and need support to recover.
To help your dog breathe easier you can run a NON-medicated humidifier in the room your dog is in, or sit in a steamed up bathroom with your dog to help keep the mucous moving. Robitussin DM at a 1/4 teaspoon per 5 pounds can be used to control the cough. Dosages can be obtained at this website. http://www.petplace.com/drug-library/dextromethorphan-robitussin-dm/page1.aspx
The following site goes over canine coughs.
I hope you find this information helpful.