|
Sorry....
http://www-912.ibm.com/j_dir/JTOpen.nsf/8178b1c14b1e9b6b8525624f0062fe9f/a74380944541564f86256bd000784990?OpenDocument
or http://tinyurl.com/8dopj7
Says to issue an ADDLIBLE command via the CommandCall class.
Charles
On Mon, Dec 22, 2008 at 8:55 AM, Jason Abreu <abreuj@xxxxxxxxxxxxxxxxx> wrote:
I'm not using a JDBC Connection. See code that I posted.
I'm using the AS400 object, then a CommandCall object generated from the
AS400 object.
Charles Wilt wrote:
The library list is controlled by parameters of the connection object.
Charles
On Mon, Dec 22, 2008 at 8:26 AM, Jason Abreu <abreuj@xxxxxxxxxxxxxxxxx> wrote:
I'm using the Java toolbox to create a report submitter to enable users
to select, modify parameters, and run reports from a web page that have
always been run from a green-screen application.
I have, so far, been able to call the program, but I need to be able to
set the library list for the environment in which the program runs.
I have looked at every option in the Job Object, but cannot find a way
to set the library list.
Can someone help me figure out how to set the library list for the job?
Thanks for any help.
//CODE FOLLOWS//
public static boolean submitBatchJob(String strProg, List strParms) {
boolean isSuccess = false;
try {
AS400 iSeries = new AS400(serverIP, userName, userPassword);
CommandCall ccNewCmd = new CommandCall(iSeries);
String strCmd = new String("CALL PGM(COLO/" + strProg + ") PARM(");
for (int i=0; i < strParms.size(); i++) {
String strParm = (String)strParms.get(i);
strCmd += "'" + strParm + "'";
if (i != strParms.size() - 1) {
strCmd += " ";
}
}
strCmd += ")";
//Modify Job Library List. Not sure what to do here.
Job cmdJob = ccNewCmd.getServerJob();
isSuccess = ccNewCmd.run(strCmd);
AS400Message[] messageList = ccNewCmd.getMessageList();
cmdMessages = new ArrayList();
for (int i=0; i < messageList.length; i++) {
cmdMessages.add(messageList[i].getText());
}
iSeries.disconnectAllServices();
} catch (Exception e) {
cmdMessages.add(e.getMessage());
}
return isSuccess;
}
--
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.
--
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 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.