Problem in compiling Java in C



Help for C/C++ for MVS, OS/390 C/C++, z/OS C/C++ and C/C++ Productivity Tools for OS/390

Problem in compiling Java in C

Postby Sundari_tcs » Mon Jul 01, 2013 9:16 pm

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!!
Sundari_tcs
 
Posts: 6
Joined: Sat Jun 29, 2013 12:27 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Problem in compiling Java in C

Postby dick scherrer » Mon Jul 01, 2013 9:53 pm

Hello and welcome to the forum,

You need to post the JCL and the error raised.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Problem in compiling Java in C

Postby NicC » Mon Jul 01, 2013 10:28 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Problem in compiling Java in C

Postby Sundari_tcs » Tue Jul 02, 2013 12:28 pm

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)
Sundari_tcs
 
Posts: 6
Joined: Sat Jun 29, 2013 12:27 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Problem in compiling Java in C

Postby NicC » Tue Jul 02, 2013 5:46 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Problem in compiling Java in C

Postby Sundari_tcs » Tue Jul 02, 2013 6:29 pm

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.
Sundari_tcs
 
Posts: 6
Joined: Sat Jun 29, 2013 12:27 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Problem in compiling Java in C

Postby Robert Sample » Tue Jul 02, 2013 7:03 pm

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.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times


Return to C, C++

 


  • Related topics
    Replies
    Views
    Last post