How long is your son having constipation? Does he strain on passing stools?
First you need to be patient.
Look into his diet.
Give him plenty of vegetables- especially the fibrous ones like spinach etc. Give him plenty of fresh fruits with the skin if possible and fruit juices prepared at home.
Give him plenty of water. One or two glasses of luke warm water daily in the morning will help.
Chose his snacks- as fibrous ones.
Food from whole grains will be better.
Avoid excess fat.
Avoid Banana, excess of potatoes, junk food.
Avoid rice based items, biscuits etc.
Check with your doctor if he has any Anal Fissures- if so get it treated. Presence of a fissure causes more pain while passing stools- so he will hold- which in turn leads to impaction
and more problems.
Give him stool softeners as your doctor says for few weeks.
After dietary modification and medications too, he does not improve or again develops the same problem- get him investigated. You may get Pediatric GastroEnterologist`s opinion.
And due to prolonged retention of stools- stool may become dark brown/ slightly black. If you are sure its like a tar- consult your doctor and get him tested for any upper GI bleeds.
Hope my answer helps you.