I did get this to work using USS.  I had to change the following calls:

           Call "IBMZOS_NewStringPlatform"
           Call "IBMZOS_NewStringPlatform"
           CALL 'IBMZOS_GetStringPlatformLength'
           CALL 'IBMZOS_GetStringPlatform'

(I don't know why that change was made, but it was)

Here is my Makefile:
PROG = IBMEXAM2
CLASSFILES = HelloJ.class IBMExample2.class
JAVABASE = /usr/lpp/java/IBM/J7.1
COBBASE = /usr/lpp/cobol/igy420

run: $(PROG) $(CLASSFILES)
        _CEE_RUNOPTS="XPLINK(ON)" CLASSPATH=. 
LIBPATH=$(JAVABASE)/lib/s390:$(JAVABASE)/bin/classic ./$(PROG)

%.class: %.java
        $(JAVABASE)/bin/javac $^

$(PROG): $(PROG).o
        $(COBBASE)/bin/cob2 -o $(PROG) $(PROG).o $(JAVABASE)/lib/s390/libjava.x 
$(COBBASE)/lib/igzcjava.x

%.o: %.cbl
        $(COBBASE)/bin/cob2 -c -I $(COBBASE)/include $^

clean:
        rm -f *.class $(PROG) $(PROG).o

Here is what happens when I type gmake run
make clean run
rm -f *.class IBMEXAM2 IBMEXAM2.o
/usr/lpp/cobol/igy420/bin/cob2 -c -I /usr/lpp/cobol/igy420/include IBMEXAM2.cbl
 PP 5655-S71 IBM Enterprise COBOL for z/OS  4.2.0 in progress ...
 End of compilation 1,  program IBMEXAM2,  no statements flagged.
/usr/lpp/cobol/igy420/bin/cob2 -o IBMEXAM2 IBMEXAM2.o 
/usr/lpp/java/IBM/J7.1/lib/s390/libjava.x /usr/lpp/cobol/igy420/lib/igzcjava.x
/usr/lpp/java/IBM/J7.1/bin/javac HelloJ.java
/usr/lpp/java/IBM/J7.1/bin/javac IBMExample2.java
_CEE_RUNOPTS="XPLINK(ON)" CLASSPATH=. 
LIBPATH=/usr/lpp/java/IBM/J7.1/lib/s390:/usr/lpp/java/IBM/J7.1/bin/classic 
./IBMEXAM2
B100-INITIALISE.
B200-INIT-INPUT-VALUES
Call "NewStringPlatform"  inStringBuf.....
B300-INIT-OUTPUT-VALUES
Call "NewStringPlatform"  outStringBuf.....
C100-MAIN.
About to call HelloJ
Hello World, from Java! 2
Returned from sayHello  data2 = 000003
About to call IBMExample2 & pass a string
IBM Example input = Hello
IBM Example output = HelloAdded Text
Just returned from JAVA
Method:GetStringPlatformLength returned (0000000016)
Method:GetStringPlatformString returned (HelloAdded Text^@)
STOP RUN.

I haven't tried it using JCL.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to