Picking up this and the duplicate thread at
http://www.rootschat.com/forum/index.php?topic=718855There's a family in 9 Leith Street Terrace, Edinburgh St Andrew in the 1881 census (transcription) consisting of
Mrs Ferguson/head/widow/born Ireland
John Ferguson/son/18/Assistant
spirit merchant/born Glasgow
Maryann Ferguson/daughter/13/born Glasgow
Margaret Reid/granddaughter/4/born Edinburgh
John Reid/grandson/3/born Edinburgh
I note from the IGI that a Mary Ann Ferguson was born in Glasgow on 20 December 1866, parents Terrence Ferguson and Mary Toller. John James' father's name looks like Harry on that marriage certificate. But imagine that John James, with a strong Glasgow/Irish accent, is telling the Edinburgh registrar that his father was Terry Ferguson. Might the registrar have misheard that as Harry?
The Ferguson household above contains two grandchildren with the surname Reid. If you get the birth certificate of one of them it should tell you the date of the marriage of Miss Ferguson to Mr Reid, and this marriage certificate will also tell you the names of Miss Ferguson's parents, and therefore those of her (presumed) brother John James.
I see that Scotland's People has two deaths of John James Ferguson(s) born 1862 plus or minus three years. If one of these is your man, his death certificate should also tell you his parents' names, assuming of course that whoever registered the death actually knew that.
You could also try the 1871 census, using James as the first name and Mary or Mary Ann or Maryann as the second name in the household. There could be other siblings whose birth certificates would tell you their mother's surname.
I note that John James Ferguson and Agnes Croan were married in a Roman Catholic church. Have you looked at the Roman Catholic records on Scotland's People?
Could John James have been born in Ireland rather than in Glasgow as the 1881 census says?