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


  • Subject: RE: How does the Jobs (JDBC and Program Call) on AS400 end?
  • From: dawall@xxxxxxxxxx
  • Date: Thu, 11 May 2000 07:36:29 -0500

Sorry, the JDBC and server folks I talked to don't have an easy solution.
The next step is old fashioned debug.  That debug is beyond the scope of
this forum so I recommend you get in touch with IBM service to handle the
problem.

David Wall
AS/400 Toolbox for Java


---------------------- Forwarded by Dave Wall/Rochester/IBM on 05/08/2000
08:16 AM ---------------------------

"AnanthaRamaiah, Gururaja (CTS)" <AGururaj@chn.cts-corp.com> on 05/05/2000
11:26:04 PM

Please respond to JAVA400-L@midrange.com

To:   JAVA400-L@midrange.com
cc:
Subject:  RE: How does the Jobs (JDBC and Program Call) on AS400 end?




Thanks for the reply Mr. Michael and dawall.
I tried a small application that calls an RPG program using
CallableStatement class (RPG program is made as a stored procedure). The
RPG
program will just create a file in QTEMP and populates it by reading a
file.

After compiling the program I just deleted the file from all libraries.
I have given INZSR(*PSSR) keyword with file declaration and *PSSR will do a
RETURN and SETON LR.
When I call this RPG program, my assumption was that the RPG will terminate
abnormally and control will come back to toolbox. But this is not
happening.
My java program is hanging and I found QZDASOINIT job with my profile HELD.
If I keep calling this program 100 times, 100 jobs will start running on
AS400 and all of them will be HELD.

How can we overcome such situation. You have mentioned about Ending JVM.
When does that happen in actual scenario.

Thanks and Regards,
Gururaj

     -----Original Message-----
     From:     dawall@us.ibm.com [SMTP:dawall@us.ibm.com]
     Sent:     Saturday, May 06, 2000 1:02 AM
     To:  JAVA400-L@midrange.com
     Subject:  Re: How does the Jobs (JDBC and Program Call) on
AS400 end?

     Great answer Michael!  I will add just two things,

     1. If the program does not end the connection via
     AS400.disconnectService(), the connection is cleaned up when the
AS400
     object is garbage collected.  That will always happen when the JVM
     terminates.  It can happen earlier if there are no more references
to a
     particular AS400 object and the garbage collector runs.

     2. The program call is blindly synchronous.  Your program does not
get
     control back from ProgramCall.run() until the AS/400 program ends
normally,
     ends abnormally, or the Toolbox object is notified that the
connection
     dropped.  (Notice the careful wording of the last condition.  The
     ProgramCall object sends a run program request to the AS/400 then
does a
     socket read waiting for the reply.  If a comm failure occurs the JVM
and
     TCP stacks must bubble the error to the socket the Toolbox is
reading from.
     This is usually reliable but not 100% perfect on all JVMs)   If the
AS/400
     program takes 8 hours to run, your thread is blocked at
ProgramCall.run()
     for that entire time.

     David Wall
     AS/400 Toolbox for Java


     Michael hawes <mihawes@yahoo.com> on 05/05/2000 04:14:32 AM

     Please respond to JAVA400-L@midrange.com

     To:   JAVA400-L@midrange.com
     cc:
     Subject:  Re: How does the Jobs (JDBC and Program Call) on AS400
end?




     Hi,
     The creation of the server jobs is controlled by the
     use of an 'AS400' class object which is required by
     every instance of a class that accesses an AS400 for
     example Program call or JDBC. You have the ability to
     control the time of connection programatically via
     this AS400 object, see: connect(String) or
     connect(int) ), or allow the connection to be made
     automatically when you utilize the connection class
     object(e.g. JDBC). Each AS400 object will represent a
     separate job on the AS/400. You can either share one
     or use seperate ones for seperate jobs.

     You can programmatically end the connection via:
     disconnectService(int) or disconnectAllServices().
     These will end the AS400 jobs.

     The AS400 jobs will terminate when the connection to
     the client ends, i.e. the JVM terminates.


     See

http://publib.boulder.ibm.com/pubs/html/as400/v4r4/ic2924/info/java/rzahh/to

olbox.htm

     for a good description of the AS400 object and access
     classes.


     --- "AnanthaRamaiah, Gururaja (CTS)"
     <AGururaj@chn.cts-corp.com> wrote:
     > Hi,
     > I have a very basic doubt. I want to know when
     > exactly the AS400 server Job
     > gets created for JDBC and program Call classes. Also
     > when will they get
     > ended?.. Does the system takes care of ending it
     > automatically or can we end
     > it programatically?..
     >
     > what happens  when if the program ends abnormally..
     > or it waits for resource
     > for a long time.
     >
     > Can anyone help me out in getting my doubt
     > cleared...
     >
     > Thanks in advance,
     > Gururaj
     > +---
     > | This is the JAVA/400 Mailing List!
     > | To submit a new message, send your mail to
     > JAVA400-L@midrange.com.
     > | To subscribe to this list send email to
     > JAVA400-L-SUB@midrange.com.
     > | To unsubscribe from this list send email to
     > JAVA400-L-UNSUB@midrange.com.
     > | Questions should be directed to the list owner:
     > joe@zappie.net
     > +---

     __________________________________________________
     Do You Yahoo!?
     Send instant messages & get email alerts with Yahoo! Messenger.
     http://im.yahoo.com/
     +---
     | This is the JAVA/400 Mailing List!
     | To submit a new message, send your mail to JAVA400-L@midrange.com.
     | To subscribe to this list send email to
JAVA400-L-SUB@midrange.com.
     | To unsubscribe from this list send email to
JAVA400-L-UNSUB@midrange.com.
     | Questions should be directed to the list owner: joe@zappie.net
     +---



     +---
     | This is the JAVA/400 Mailing List!
     | To submit a new message, send your mail to JAVA400-L@midrange.com.
     | To subscribe to this list send email to
JAVA400-L-SUB@midrange.com.
     | To unsubscribe from this list send email to
JAVA400-L-UNSUB@midrange.com.
     | Questions should be directed to the list owner: joe@zappie.net
     +---
+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---












+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.