cybergc,
First of all, this is my opinion and do consult with your attorney before making a final decision.
First to answer your questions:
1>
----Can my YY company file for my 8th year ext based on XX companies LC?
I think yes, but depends if some one else is substitued on that LC or not by XX. If some one is substitued, you may or may not get your 8th year ext. I do not know in such a case, how USCIS will interpret.
2>
----If answer is "NO" then what would be advise for me?
There are chances of yes, but lets assume the answer is no and this is what I will suggest anyway.
There are 2 cases
a) You want to stay with YY. In this case YY can file 8th year ext for you based on the LC filed by YY in Sept 2003. The way I understand this 365 days rule is that the LC should be more than 365 days old when you file for extension beyond 6th year based on that LC. In my opinion, for 8th year ext, it does not matter if LC was filed 365 days before 6th year limit. It should have been file 365 days before 7th year limit.
b) You want to join ZZ. In this case, 8th yr. ext. depends if the LC on which you are substituded is more than 365 days old before you file for 8th year. Lets say the substitute LC from ZZ was originally filed on March 15 2004. Then you were substitued on it in Dec 2004. Now on March 15 2005, this LC will be 365 days old. So IF you file your 8th year ext, based on this Lc after March 15 2005, showing the proof that you have already been substituted on it, there are very good chances of approval. In case this LC is not 365 days old before you need to file 8th year ext., you may use LC from YY to file for 8th year ext with ZZ.
The key here is that the LC should be more than 365 days old when you file for extension beyond 6th. So for 8th year, it does not depend if it was filed in your 5th year or not.
Hope it helps!