|
This is a multipart message in MIME format. -- [ Picked text/plain from multipart/alternative ] Albert, One way that works is to run the Java class via QShell. Add the following environment variable: Addenvvar ENVVAR(QIBM_QSH_CMD_OUTPUT) + VALUE(NONE) You can also specify a value that is an IFS file name, like /tmp/output.txt if you want to capture it somewhere. Then, instead of using the JAVA command, use the QSH command like this: QSH CMD(java -Djava.version=1.2 xvr.app.sip.ba.poolspa.logic.entity.APIProduccion 'PARM1' 'PARM2' etc...) The syntax of the java command string might not be right. Instead of trying to do this on SBMJOB, I would write a small CL that setup the environment variables and executes the QSH command. Then just use SBMJOB to CALL this CL program in batch. You would pass the parms you want to the CL program so that it could pass them to the java class. Also, since you need to pass variable parms, you will have to build the correct java command string in a CL variable and execute it via QSH like this: Chgvar &QshCmd ('java' *Bcat + 'com.softlanding.opensource.wstools.WebAppUpdate' *BCat '''' + || &XMLDOC *Tcat '''' *BCat &Stop *Bcat &Delete *Bcat + 'Y' *Bcat &Start) Qsh Cmd(&QshCmd) Mark albert_dalmau@roca.net Sent by: java400-l-admin@midrange.com 06/19/2002 04:25 AM Please respond to java400-l To: JAVA400-L@midrange.com cc: Subject: (no subject) Hi, I have a question very easy but very important for us. I execute a Java program with a SBMJOB command and I'm trying to avoid the spool file with the message "Java program completed". I tried using the os400.stderr property as I show you: RMVENVVAR ENVVAR(CLASSPATH) MONMSG MSGID(CPFA981) ADDENVVAR ENVVAR(CLASSPATH) + VALUE(".:/:/dalmau:/oracle:/QIBM/ProdData/H+ ttp/Public/jt400/lib/jt400Access.zip:/QIBM/+ ProdData/Http/Public/jt400/lib/jt400.zip:/Q+ IBM/ProdData/Http/Public/jt400:/QIBM/ProdDa+ ta/Java400") MONMSG MSGID(CPFA980) SBMJOB CMD(JAVA + CLASS(xvr.app.sip.ba.poolspa.logic.entity.A+ PIProduccion) PARM(&NPEDID &NTRES &CARTI + &LITPIE &FECHA) PROP((java.version 1.2) + (os400.stdout 'file:/Dalmau/Out') + (os400.stderr 'file:/Dalmau/Err'))) + CPYENVVAR(*YES) ...but it doesn't work. Sorry for my english. Any suggestion will be appreciated. Thanks from Barcelona. Albert _______________________________________________ This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list To post a message email: JAVA400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l or email: JAVA400-L-request@midrange.com 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.