× 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 have a bit of Java code that works on one system but not another and I
cannot find anything - spool file, message queue message, job log to tell
me what is wrong with my command call. Even the AS400-Message class is a
fail. I just get 'false' from the run() method. There has to be a job out
there somewhere that has left a spool file around.

???

boolean runCommand(String commandFinal)
{
boolean commandOK = false;

/*
IBM Java ToolBox CommandCall class.

http://www-01.ibm.com/support/knowledgecenter/ssw_ibm_i_71/rzahh/cmdc.htm
*/
CommandCall command = new CommandCall(m_as400sys);
try {
if ((commandOK = command.run(commandFinal)) != true) {

// Note that there was an error.
m_log.error("Command failed! " + commandFinal);
}

// Show the messages (returned whether or not there was an
error.)
// Note: for the STARTQQENG command this block of code will
never print anything
// unless the STARTQQENG *CMD and CL *PGM code is changed to do
so.
AS400Message[] messagelist = command.getMessageList();
for (int i = 0; i < messagelist.length; ++i) {

// Show each message.
m_log.info(messagelist[i].getText());
}
}
catch (Exception e) {
m_log.error("Command " + command.getCommand() + " issued an
exception!");
e.printStackTrace();
}
return commandOK;
}


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.