There is still great pay if you are an AS/400 guru. About 3 years ago I interviewed for a job where I would be maintaining code which was running on an AS/400 running in System 36 emulation mode. The code had been certified by the government for a 50 year contract. The 3 previous employees had all died. Which didn't make me anxious to take the job, but the pay was $450k a year. And with job security through 2030 it had some appeal. But what do you do after?
"I have experience with 50 year old software" is kind of like the resumes people send me saying they know Office XP and Word Perfect.
Sure if you can fix the things nobody else can you can charge top dollar, but eventually the last of those things come out of service.