Hi Jan
I found William in 1841 agd 40 on Freecen living in Abercorn with wife Margaret 25, Mary 13, Catherine 8 and Elizabeth 5.
Then found him in 1851 still in Abercorn aged 52 born Uphall. Wife Margaret 37 born Inverness and three children, Betsy 7 born Abercorn, Agnes 3 born Abercorn and Charles 2 born Abercorn.
A quick search on the IGI shows a birth for William Boag in 1798 in Uphall, parents James Boag and Catherine Young. He looks like a likely candidate. Particularly as he named 2 of his children James and Catherine (after the assumed parents)
Of course the only way to confirm this is to get his d.c. from
www.scotlandspeople.gov.uk. We know he died in 1872 from the MI. I had a quick look on SP and there is a death for a William Boag in Abecorn in 1872. As long as the informant to his death knew his parents names, they will show on the d.c.
No dates are shown on the MI for his first wife or son. His wife must have died prior to 1841 as he is shown with his second wife in that census.
Regards
Jean