Hello. No medicine can be given for long term. Important is to give lot of fluids and plenty of roughage foods in his diet ( apple, cucumber, carrot, nuts, sprouts etc) which will improve his stool habit.
Next Steps
do not give too much of milk and substitute it with milk based porridge and proper meal.