× 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 think this is pretty easy you can use the command "chglibl" before you
call your program.

Regards

Ralf




Von:
Jason Abreu <abreuj@xxxxxxxxxxxxxxxxx>
An:
JAVA400-L@xxxxxxxxxxxx
Datum:
22.12.2008 14:45
Betreff:
JT400 Job Library List
Gesendet von:
java400-l-bounces@xxxxxxxxxxxx



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;
}





As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.