The BY REFERENCE passing method is not permitted for Java primitive and immutable types as their values cannot be changed within the Java program; you must change the CALL statement.
01 x pic x(10) *> maps to a Java String ... call "java.Demo2.depart2" using BY REFERENCE x. *> cannot be passed BY REFERENCE ...