Page 1 of 1

Problem in compiling Java in C

PostPosted: Mon Jul 01, 2013 9:16 pm
by Sundari_tcs
Hi all,

I am trying to call java in C on Zos, from the webpages I come to know about of the jni header file.Even after including the header file in system libraries I cant able to execute, it throws a jcl error .Is there any specified compiler program to call java in C.It will be very helpful for me if you share your knowledge.

Thanks in advance!!

Re: Problem in compiling Java in C

PostPosted: Mon Jul 01, 2013 9:53 pm
by dick scherrer
Hello and welcome to the forum,

You need to post the JCL and the error raised.

Re: Problem in compiling Java in C

PostPosted: Mon Jul 01, 2013 10:28 pm
by NicC
And please note: JCL errors are NOT thrown. Jobs FAIL with JCL errors or they are NOT RUN. Java and C code 'throw' errors which they, hopefully, 'catch' but when they terminat with an error they abend or fail but the word thrown is not used externally.

Re: Problem in compiling Java in C

PostPosted: Tue Jul 02, 2013 12:28 pm
by Sundari_tcs
NicC @ Thanks for sharing my mistake,i will rectify it.

dick scherrer @ Thanks for your warm welcome!!!

Hereby,I posting the jcl and error raised for your reference.Suugest me the way to execute it..

JCL:
JOBCARD
//*******************************************************
//CBCCL PROC MEM=,
//           CREGSIZ='0M',
//           DCB80=(RECFM=FB,LRECL=80,BLKSIZE=3200),
//           DCB3200=(RECFM=FB,LRECL=3200,BLKSIZE=12800)
//* -------------------------------------------------------------*
//PC  EXEC PGM=DSNHPC,REGION=0M,
//    PARM=('HOST(CPP(FOLD)),DATE(EUR),MARGINS(1,80),CCSID(1047)')
//*   'LEVEL(A123),FLOAT(IEEE)')
//STEPLIB DD DSN=SYS1.DSN910.SDSNEXIT,DISP=SHR
//        DD DSN=DSN910.SDSNLOAD,DISP=SHR
//SYSLIB  DD
//DBRMLIB  DD
//SYSLMB   DD DUMMY
//SYSCIN   DD
//SYSPRINT DD SYSOUT=*
//SYSTERM  DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSUT1   DD SPACE=(800,(300,300),,,ROUND),UNIT=VIO
//SYSUT2   DD SPACE=(800,(300,300),,,ROUND),UNIT=VIO
//* -------------------------------------------------------------
//*  CCOMPILE STEP:
//* -------------------------------------------------------------
//CCOMP EXEC PGM=CCNDRVR,REGION=&CREGSIZ,
//      PARM='CXX OPTF(DD:SYSOPTF),LOC("EN_US.IBM-1047")'
//STEPLIB  DD  DSNAME=CEE.SCEERUN2,DISP=SHR
//SYSLIB   DD
//SYSIN    DD 
//SYSLIN   DD 
//SYSPRINT DD  SYSOUT=*
//SYSCPRT  DD  SYSOUT=*
//SYSOUT   DD  SYSOUT=*
//SYSUT1   DD  UNIT=VIO,SPACE=(3200,(300,300)),DCB=&DCB80
//SYSUT4   DD  UNIT=VIO,SPACE=(3200,(300,300)),DCB=&DCB80
//SYSUT5   DD  UNIT=VIO,SPACE=(3200,(300,300)),DCB=&DCB3200
//SYSUT6   DD  UNIT=VIO,SPACE=(3200,(300,300)),DCB=&DCB3200
//SYSUT7   DD  UNIT=VIO,SPACE=(3200,(300,300)),DCB=&DCB3200
//SYSUT8   DD  UNIT=VIO,SPACE=(3200,(300,300)),DCB=&DCB3200
//SYSUT9   DD  UNIT=VIO,SPACE=(3200,(300,300)),
//             DCB=(RECFM=VB,LRECL=137,BLKSIZE=882)
//SYSUT10  DD  SYSOUT=*
//SYSUT14  DD  UNIT=VIO,SPACE=(3200,(300,300)),DCB=&DCB3200
//SYSUT15  DD  SYSOUT=*
//         PEND
//*---------------------------------------------------------------*
//STEP01 EXEC CBCCL,MEM=
//PC.SYSIN DD
//CCOMP.SYSOPTF DD
//*---------------------------------------------------------------*
/*


Error

N1-JCL ERROR CN(INTERNAL)

Re: Problem in compiling Java in C

PostPosted: Tue Jul 02, 2013 5:46 pm
by NicC
1 - there are more error messages somewhere relating to the JCL error
2 - your PROC has MEM= but there is no &MEM within the procedure
3 - you have
//SYSCIN DD
whch is an invalid DD statement as it is - if it was the start of concatenation override then it could be valid

but without the error messages we can only guess.

Re: Problem in compiling Java in C

PostPosted: Tue Jul 02, 2013 6:29 pm
by Sundari_tcs
the PROC will hold the member name,it is declared at the bottom.SYSCIN is for DBRMLIB.

*if it was the start of concatenation override then it could be valid i cant able to get it properly.

Re: Problem in compiling Java in C

PostPosted: Tue Jul 02, 2013 7:03 pm
by Robert Sample
If your JCL is as you posted, then you have a GREAT deal of work ahead of you. I had assumed you redacted the data set names for security purposes but if not, each DD statement needs -- at a minimum -- a data set name and disposition (DSN=?,DISP=?) and possibly more information. You must also specify input to the PC step (usually //SYSIN DD DSN=?(&MEM),DISP=SHR or something similar). And no, we cannot tell you the data set names since they are specific to each site and anything we told you would most likely be wrong. You must contact someone working AT YOUR SITE to get those details.