× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



This app requires V5R2M0 or higher.  We figured out how to debug it.  In
the JAVA code, we create the 400 object, then display the job info and
do a read from the keyboard.  Using the job info we issue a STRSRVJOB
and STRDBG, adding the *SRVPGM.  After setting break points, we enter
any key in the JAVA app and the *SRVPGM procedures break were we set
them to.

We have not looked anymore at why we can't seem to pass char variables,
but now that we've figured out debuging we can give it another try.  I
take it I couldn't always find the job because the loglvl was probably
defaulting to *NOLIST.  I added a system() call to do a CHGJOB and set
the log level to *SECLVL.   

I still don't know why I couldn't find the printf() output, but we
haven't tried that approch for a while.

> message: 3
> date: Thu, 16 Dec 2004 07:49:43 -0800
> from: "Gary L Peskin" <garyp@xxxxxxxxxxxx>
> subject: RE: Calling *SRVPGMs from JAVA - How to DEBUG?
> 
> What release of OS/400 are you on? 
> 
> > -----Original Message-----
> > Subject: Calling *SRVPGMs from JAVA - How to DEBUG?
> > 
> > Our biggest issue is debugging the *SRVPGM procedures.  How 
> do we do 
> > that?  I can't figure out where the *SRVPGM is running.  The JAVA 
> > program prints the job info it gets, but I can't always 
> find that job 
> > and even if I do there is nothing useful there.  If I have the C use
> > printf()  I can't find the output.  Anyone know where the 
> output goes 
> > and how to debug this?
> >  
> > We have a JAVA program that needs to call a *SRVPGM that contains 
> > *MODULEs written in C, CL and RPG.  Calling the C is not too bad, 
> > except we seem to have issues passing char variables.  We've got 
> > around it so far by just passing them as char * instead, 
> but we have 
> > to write wrappers for the procedures that expect plain char 
> > parameters.
> >  
> > We also seem to have found that whatever job the *SRVPGM is 
> running in 
> > on the iSeries does not seem to have a *LIBL.  We had to write a 
> > procedure that calls an existing CL that sets the appropriate *LIBL.
> > This is mainly an issue with the RPG, since the C can specify the 
> > library as a variable at run time.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.