|
Hi John, Try this as a ProgramCall constructor: ProgramCall dayendProgram = new ProgramCall(system, "/QSYS.LIB/GTSTPGMS.LIB/ARB771.PGM", paramList); Alex Pinsky, Aeropostale, Inc. -----Original Message----- From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx]On Behalf Of John Gilmore-Baldwin Sent: Wednesday, September 29, 2004 8:39 PM To: Java Programming on and around the iSeries / AS400 Subject: ProgramCall.run() hangs I'm having a problem getting a ProgramCall instance to do anything when the run() method is called. It doesn't error out, or pass through, or seemingly even connect to the iSeries. Does anyone have any ideas what I might be doing wrong or how I might better debug the issue? Here's a code snippet, fwiw: ProgramParameter[] paramList = new ProgramParameter[1]; AS400Text paramText = new AS400Text(20); paramList[0] = new ProgramParameter(paramText.toBytes("16092604G1 I NN ")); System.out.println("About to call program"); ProgramCall dayendProgram = new ProgramCall(system, QSYSObjectPathName.toPath("GTSTPGMS", "ARB771", "PGM"), paramList); System.out.println("Program about to be called."); if (dayendProgram.run() != true) { System.out.println("About to get error messages."); AS400Message[] messageList = dayendProgram.getMessageList(); for (int i = 0; i < messageList.length; i++) { System.out.println("Message " + i); System.out.println(messageList[i].getText()); } } else { System.out.println("Got done!"); } system.disconnectAllServices(); And here's the output I get (which outputs in about 5 seconds, but I wait 10 minutes before giving up): About to connect Got connected About to call program Program about to be called. -- John Gilmore-Baldwin jbaldwin@xxxxxxxxxxxxxxx -- 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. "The information contained in this email message and any attachments is confidential and is intended only for the use of the individual(s) or entity to which it is addressed. If you are not the intended recipient, you are hereby notified that copying, distribution or dissemination of this email and any associated documents is strictly prohibited. Thank you"
As an Amazon Associate we earn from qualifying purchases.
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.