@iam815518 House training should be your first goal.
Take him on LONG walks. When he does it's business outside, give praise, petting and treats.
If you catch the dog doing it's business in the house, take it in the back yard (if available). As punishment, if you choose, you can give short 5...