They are most certainly not a discontinued product. We just purchased a brand new Power9 server at work. The model we purchased was just released. Everyone at work still calls it an AS400. They are bulletproof and run many large businesses today. They are also not mainframes but are a class of machines called minicomputers.
IBM Power Series is closer to the RS6000, no? Running real AIX and having a full JCL makes them a far sight better than the RPGII stuff on the AS/400. Night and day.