Sharing COBOL items with Java via the JAVA-SHAREABLE is not supported for nested programs, and you must remove the directives from that program.