The one time that UA put me on an AA flight ages ago, I had no problem with getting the UA miles. There was a short form to submit to UA with the cancelled flight number and they credited the miles. If I'd had a AA account at the time, I figure I'd have gotten those miles too. According to AA program rules on their website, you do not get AA miles for cancelled flights but it's nice to see the occasional exception made.
------------------
Regards,
- Anna