M.A.O.I.S. = Middle Age Occupational Impasse Syndrome. From age 30 to 50 one can feel like a failure, and not know or understand what it is one should really be doing.
One could be unemployed and looking for a job, but never finding a good job. Or, one could be employed but in a job where there is no chance of future promotion or success.
Ted has a bad case of M.A.O.I.S. - he's been out of a job for three years and does not know what he wants to do for a living.
Mary has M.A.O.I.S. because she is working in a job that has no chance of promotion or increase in salary.