It sounds like it's time to see a vet about these issues, and soon! There's so many possibilities that we can't possibly guess at the answer in this forum. He could be constipated, or he could have a much more serious problem like
organOrgan-1 nr system disease that's caused him to be
painfulPainful menstrual periods in his abdomen and to stop eating, which would explain the lack of stool.
Your vet will probably want to run some bloodwork to check out his
organsOrgan-1 nr and general health, and likely will want to take some xrays to evaluate his stomach and intestines as well as internal
organsOrgan-1 nr. Once you have some more specific information from these tests, you should have a much better idea of what might be going on with your dog, although sometimes more follow up tests may be required. Then you can get him on an appropriate treatment and, hopefully, feeling better soon!
Best of luck!
Please check back in here and let us know what your veterinarian finds.