I have an Atlas 1056B03 remote also labeled JP2 at the 6 pin connector. On that remote OnDemand is a so-called multimacro key. Using 995, the remote can be programmed with macro A via: Setup until 2 blinks, 995, OnDemand, , Setup until 2 blinks. The same series of commands will record macro B, etc. In normal operation, pressing OnDemand the first time will issue macro A. The next press of OnDemand will issue macro B. I don't know how many macros or how many total button presses are permitted.
Here's where we have to be careful. The normal instructions for clearing a macro are: Setup until 2 blinks, 995, BoundButton, BoundButton, Setup until 2 blinks. The term BoundButton means the button that the macro is assigned to. However, when the BoundButton is a multimacro button, e.g. OnDemand, pressing it twice doesn't clear the macro. Instead, if macro A has already been assigned, pressing OnDemand twice in a 995 sequence simply adds macro B, where macro B is the single button press OnDemand.
Instead, to clear a multimacro button, do Setup until 2 blinks, 995, OnDemand, Setup until 2 blinks. The key is to only press OnDemand once.
I have a JP1/2 interface cable, and I have verified the above statements by looking at the flash memory of the remote using RemoteMaster. Of course, the C4000 may behave differently. I like to test macros by programming e.g. TV, up arrow, Audio, down arrow, DVD, left arrow, etc. Then I can see the various Device LEDs flash as the macro runs. It is important to check beforehand that each device has a defined action for the arrow buttons-- otherwise the LED won't flash. Avoid testing with number buttons, Vol, Channel, and transport buttons because these are frequently routed to other devices. For example, a press of Vol+/- will (on a stock remote) blink TV even if the remote is in DVD or Cable mode. Most cable remotes send Ch+/-, the number buttons, etc. to the Cable device.
BTW, on the 1056B03, the two buttons flanking the OnDemand button are also multimacro buttons. I believe that all other buttons (excepting device, Power, and Setup) are ordinary macro buttons.