× 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.



Hi Chris,

If you are using WDSc and have OS/400 V5R2 or higher then there is an easy 
way to debug *SRVPGMs called from Java using something called Service 
Entry Points:

1.  In the RSE expand your service program to see a list of modules that 
make up the *SRVPGM.
2.  Expand the module you are interested in to see the procedures.
3.  Right click on the procedure and select Set > Service Entry Point
4.  Now go and run your Java program (or servlet, ....)

What this basically does is sets a breakpoint in OS/400 such that when 
that procedure gets called in a job running under your user profile the 
job automatically gets suspended and WDSc automatically switches to the 
debug perspective and you are debugging the procedure call.

You will need to make sure you have the latest PTFs on the iSeries: 
http://www-1.ibm.com/support/docview.wss?uid=swg21044473

Make sure you have the RSE PTFs (listed under General Product PTFs) and 
the integrated iSeries Debugger PTFs.

Hope this helps.

Don Yantzi
Technical Release Lead
WebSphere Development Studio &
WebSphere Development Studio Client for iSeries
IBM Toronto Lab
Phone: (905) 413-4476
IBM internal:  IBMCA(yantzi)  -  Internet: yantzi@xxxxxxxxxx




"Chris Wolcott" <CWolcott@xxxxxxxxxxxxxxxxxxxxxx> 
Sent by: java400-l-bounces@xxxxxxxxxxxx
12/16/2004 10:20 AM
Please respond to
Java Programming on and around the iSeries / AS400 


To
<java400-l@xxxxxxxxxxxx>
cc

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. 
 
--
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) 
mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.