What breed dog do you have?
What type of diet are you feeding?
Did the dog do any activity before this happenen?
Did They do any spinal X rays?
Was blood work done?
Is he limping?
What pain medication was given?
What is the dogs weight?
How much Pepcid did they tell you to give?
Can the dog walk up and down stairs without hesitation?
Is the dog crated or free roaming the house?
I tend to agree with the Vet about the back and being a spinal issue. The problem with spinal issues is that they can radiate around to the abdominal area. The Pepcid AC is very good and will help protect teh stomach. I would stay away from the Gas X for now.
Tramadol does not contain Aspirin and is a very safe pain medication in to comparaison to many others on the market: http://tramadoluspharmacy.com/ingredients.html
I would stop the free roaming at this point and take him out on a leash and bring him back inside and have him crated or keep him in a smaller area where his activity can be limited. I would start with Heat pack(you can make a rice sock by placing uncooked rice in a sock, tieing it off, warming it in the microwave and wrapping in a towel) and apply it to the spine to help relieve the pain. With a problem like this we address it with rest, heat and pain medication. He is an older boy, so arthritis may also be an issue rearing its ugly head.
As for the stomach issue, you can try a bland diet by boiling skinless chicken breast 1 part to 3 parts white rice. This will allow the stomach to rest. The bland diet along with the Pepcid should help any stomach issues.
The key right now is to limit any activity. You can use a towel underneath the abdomen to help him get up and down moer easily. I would have the dog see a Veterinary Neurologist or Orthopedist to confirm the spinal issues. They may considet giving a steroid shot to help relieve inflammation if this is a spinal issue.
Again even with pain medication limited activity will be a big help with what is happening. Joan