qbteachmt
Level 15

"which he invested for more than 5 years."

That's not how the various 5-year rules are stated, though.

I recommend investopedia articles, such as:

https://www.investopedia.com/ask/answers/05/waitingperiodroth.asp

Once you confirm everything about this scenario is qualified, you would use the applicable code and not the code from the 1099-R. Remember that the issuer only knows about the distribution, really. They don't know the entire event that transpires. For instance, they won't know about indirect rollovers.

*******************************
Don't yell at us; we're volunteers