David,
Sony TVs have discrete IR codes.
See this link for an excel sheet with Sony codes of varying device ids. Start with sheet 0001 and try codes. If the code does not work, try same code from other sheet.
[Link: files.remotecentral.com]Denon and the Yamaha both have discreet power codes.
For the STB, some have reported that you can issue Power Toggle to turn the unit off and the Menu command to turn it on. If you follow that approach, you have pseudo discrete power.
To keep the Denon and TV power separate, turn of what is called CEC control in the TV and/or the Denon.
On a side note, in PEP2/3, links to anything other than the Macros are not supported. The old style links were only supported in earlier editors and PEP1.
Lyndel