Hi,
The iPhone can send SMS to non Apple IDs and non Apple phones.
It can also send iMessages to other registered iPhones and Apple IDs
This is enabled just by Enabling the app.
Adding the Apple ID to the Mac version allows that to do the same.
Adding that ID to the iPhone will sync iMessages.
With iOS 8 or above on the iPhone and Yosemite or Above on the Mac then SMS Messages can then be Sent and Received on the Mac as well as the iPhone.
The action is the iPhone needs to connect by WiFi to the LAN the Mac is on.
Then the Text Forwarding needs to be Enabled.
This in turn should cause a pop up/slide out on the Mac version that shows the Code Number which then needs entering back on the iPhone.
SMS (Text) Forwarding does use the same Apple ID on both Mac and iPhone as the iMessages account does but in effect it is separate.
The iPhone gets SMS items from the Carrier via the iPhone Number. It then Forwards them on the LAN to the Mac addressed to the Apple ID.
The Mac sends SMS via it's Apple ID to the iPhone that then send them by the iPhone Number to the carrier service.
You talk about not getting iMessages (blue bubbled items when Sending replies) but wanting to link SMS (Green indicated ones on Sending) which is different.
Sorting out the Code Number will not restore iMessages.
However the two devices might not link for SMS if there is an issue with the Apple ID in the first place.
9:42 pm Monday; November 23, 2015
iMac 2.5Ghz i5 2011 (Mavericks 10.9)
G4/1GhzDual MDD (Leopard 10.5.8)
MacBookPro 2Gb (Snow Leopard 10.6.8)
Mac OS X (10.6.8),
Couple of iPhones and an iPad