Yep did this with my Yamaha MD8 years ago after my Atari finally died and was forced to go PC for MIDI. Note my joined the forum date, If you dig up my first post I think that was my question! It was the Guitar Studio forum which I don't see anymore.
Funny how simple it was with the atari, KCS just has a simple "midi sync" in the transport. Anyhow it does work , at least it did work with older versions of Cakewalk, and both ways.
But Sonar needs a lot of TLC before it goes, unlike the Atari did. PC always sucked at MIDI...