I flew on AA coded AS flight before and couldn't got the miles credit when I contacted JMB in HK. I let it go as it was only a short flight from SFO to LAX. But the website states that you can.
http://www.ar.jal.com/world/en/jalmile/flight/aa.html
※Includes American Eagle and AmericanConnection flights and all codeshare flights with AA flight numbers.