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



I'd also add in some debug logging code (log4j?) in your code. I use
log4net, but given its origins as a port of log4j I'd assume log4j works
roughly the same way. I would expect to see your code more like
(//logging call):

// clear the queue for any previous message
queue.remove();
log.debug("Cleared"); //logging call

// call RPG program
boolean rc = pcml.callProgram(pcmlFile);
log.debugFormat("Call returned {0}", rc); //logging call

//if call is successful
List messages = new ArrayList();
if (rc)
{
Enumeration e = queue.getMessages();
if (!E.hasMoreElements())
log.Warn("e has no elements"); //logging call

while (e.hasMoreElements())
{
QueuedMessage msg = (QueuedMessage) e.nextElement();
log.debug("Got message"); //logging call
msg.load();
messages.add(msg.getID() + " " +
StringEscapeUtils.escapeJava(msg.getText()) +
"|" +
StringEscapeUtils.escapeJava(msg.getHelp()));
}
}
else
log.Warn("Call was unsuccessful"); //logging call

Then I'd just say crank up the loglevel and see what falls out.

-Walden

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.