Mainframe compilers do not allow the RECURSIVE clause in a program that also has nested programs.
Recode your program so that it does not use this structure.