Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 99981 invoked from network); 9 Apr 2007 18:49:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Apr 2007 18:49:07 -0000 Received: (qmail 76574 invoked by uid 500); 9 Apr 2007 18:49:03 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 76543 invoked by uid 500); 9 Apr 2007 18:49:03 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 76520 invoked by uid 99); 9 Apr 2007 18:49:03 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Apr 2007 11:49:03 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [192.223.178.26] (HELO maillnx-us311.fmr.com) (192.223.178.26) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Apr 2007 11:48:55 -0700 Received: from MSGMROSM02WIN.dmn1.fmr.com (MSGMROSM02WIN.dmn1.fmr.com [172.26.31.170]) by maillnx-us311.fmr.com (Switch-3.1.8/Switch-3.1.7) with SMTP id l39ImYxN019195 for ; Mon, 9 Apr 2007 14:48:34 -0400 Received: from MSGMROIV01WIN.DMN1.FMR.COM (172.26.31.106) by MSGMROSM02WIN.dmn1.fmr.com (Sigaba Gateway v4.0) with ESMTP id 129311127; Mon, 09 Apr 2007 14:48:34 -0400 Received: from MSGMMKIM01WIN.DMN1.FMR.COM ([172.25.108.46]) by MSGMROIV01WIN.DMN1.FMR.COM with SMTP_server; Mon, 09 Apr 2007 14:48:34 -0400 Received: from MSGMRORG02WIN.DMN1.FMR.COM ([10.37.20.22]) by MSGMMKIM01WIN.DMN1.FMR.COM with Microsoft SMTPSVC(5.0.2195.6713); Mon, 9 Apr 2007 14:48:33 -0400 Received: from MSGDALRG06WIN.DMN1.FMR.COM ([10.41.38.22]) by MSGMRORG02WIN.DMN1.FMR.COM with Microsoft SMTPSVC(5.0.2195.6713); Mon, 9 Apr 2007 14:48:33 -0400 Received: from msgdalcln2win.DMN1.FMR.COM ([10.41.181.15]) by MSGDALRG06WIN.DMN1.FMR.COM with Microsoft SMTPSVC(5.0.2195.6713); Mon, 9 Apr 2007 13:48:32 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: calling a DB2 request. Date: Mon, 9 Apr 2007 14:48:32 -0400 Message-ID: <327BBBAD6F12294EAD9934A2BB5E769B052D9220@MSGDALCLN2WIN.DMN1.FMR.COM> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: calling a DB2 request. Thread-Index: Acd60KUSRTJ3F4yIR6ea87QT5UhMoAABLW/wAABusMA= References: <327BBBAD6F12294EAD9934A2BB5E769B052D921F@MSGDALCLN2WIN.DMN1.FMR.COM> From: "Ditrick, Gregory" To: "Ant Users List" X-OriginalArrivalTime: 09 Apr 2007 18:48:32.0887 (UTC) FILETIME=[AC321870:01C77AD7] X-Virus-Checked: Checked by ClamAV on apache.org Actually, it looks like you'll need combinations of the two(2). I'd do this: You may have to break it apart more than that. Try what you might think makes sense. =20 GregD 6-8309 -----Original Message----- From: Ditrick, Gregory=20 Sent: Monday, April 09, 2007 2:36 PM To: Ant Users List Subject: RE: calling a DB2 request. Dwayne, Change this line: To this: The will put quotes around the arg to treat it as 1 argument instead of individual args. Or Use multiple for each of your arguments. I hope this helps. Later,=20 GregD 6-8309 -----Original Message----- From: Dwayne Walker [mailto:wb5plj@gmail.com]=20 Sent: Monday, April 09, 2007 1:58 PM To: user@ant.apache.org Subject: calling a DB2 request. Hi I am having a problem passing some sql to the db2cmd via ant. This is very confusing as I am doing this exact thing elseware with no problem (just differant sql, and I have verified the sql is valid) but in this one I am having problems. Any time I run this I get the folowing message from the db2 clp window that opens up. SQL0104N An unexpected token "SET" was found following "". Expected tokens may include: "NEW". SQLSTATE=3D42601 C:\eclipse_workspace\massSQL> I don't know what is going on here but I am by no means familiar with db2cmd and all that so any help is apreachated. If I could get this to work in a batch file or from a command line I am sure I could get the ant part of it on my own. it is the db2 that is giving me issues. thanks. Dwayne this is the console log from ant of what is being passed. Apache Ant version 1.7.0 compiled on December 13 2006 Buildfile: C:\eclipse_workspace\massSQL\count.xml parsing buildfile C:\eclipse_workspace\massSQL\count.xml with URI =3D file:/C:/eclipse_workspace/massSQL/count.xml Project base dir set to: C:\eclipse_workspace\massSQL Build sequence for target(s) `query' is [init, query] Complete build sequence is [init, query, query3, query2, ] init: [antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found. [loadfile] loading C:\eclipse_workspace\massSQL\transactionCount.sql into property sql [loadfile] loaded 383 characters [echoproperties] #Ant properties [echoproperties] #Mon Apr 09 11:12:51 CDT 2007 [echoproperties] DSTAMP=3D20070409 [echoproperties] TODAY=3DApril 9 2007 [echoproperties] TSTAMP=3D1112 [echoproperties] ant.core.lib=3DC\:\\eclipse\\plugins\ \org.apache.ant_1.7.0\\lib\\ant.jar [echoproperties] ant.file=3DC\:\\eclipse_workspace\\massSQL\\count.xml [echoproperties] ant.file.dailyTransactions=3DC\:\\eclipse_workspace\ \massSQL\\count.xml [echoproperties] ant.home=3DC\:\\eclipse\\plugins\\org.apache.ant_1.7.0 [echoproperties] ant.java.version=3D1.5 [echoproperties] ant.library.dir=3DC\:\\eclipse\\plugins\ \org.apache.ant_1.7.0\\lib [echoproperties] ant.project.name=3DdailyTransactions [echoproperties] ant.version=3DApache Ant version 1.7.0 compiled on December 13 2006 [echoproperties] awt.toolkit=3Dsun.awt.windows.WToolkit [echoproperties] basedir=3DC\:\\eclipse_workspace\\massSQL [echoproperties] database=3Ddb0z [echoproperties] eclipse.pdebuild.home=3D/C\:/eclipse/plugins/ org.eclipse.pde.build_3.2.1.r321_v20060823/./ [echoproperties] eclipse.pdebuild.scripts=3D/C\:/eclipse/plugins/ org.eclipse.pde.build_3.2.1.r321_v20060823/scripts/ [echoproperties] eclipse.pdebuild.templates=3D/C\:/eclipse/plugins/ org.eclipse.pde.build_3.2.1.r321_v20060823/templates/ [echoproperties] errorFile=3DdailyTransactionsError.txt [echoproperties] file.encoding=3DCp1252 [echoproperties] file.encoding.pkg=3Dsun.io [echoproperties] file.separator=3D\\ [echoproperties] java.awt.graphicsenv=3Dsun.awt.Win32GraphicsEnvironment [echoproperties] java.awt.printerjob=3Dsun.awt.windows.WPrinterJob [echoproperties] java.class.path=3DC\:\\eclipse\\plugins\ \org.apache.ant_1.7.0\\lib\\ant-antlr.jar;C\:\\eclipse\\plugins\ \org.apache.ant_1.7.0\\lib\\ant-apache-bcel.jar;C\:\\eclipse\\plugins\ \org.apache.ant_1.7.0\\lib\\ant-apache-bsf.jar;C\:\\eclipse\\plugins\ \org.apache.ant_1.7.0\\lib\\ant-apache-log4j.jar;C\:\\eclipse\\plugins\ \org.apache.ant_1.7.0\\lib\\ant-apache-oro.jar;C\:\\eclipse\\plugins\ \org.apache.ant_1.7.0\\lib\\ant-apache-regexp.jar;C\:\\eclipse\\plugins \\org.apache.ant_1.7.0\\lib\\ant-apache-resolver.jar;C\:\\eclipse\ \plugins\\org.apache.ant_1.7.0\\lib\\ant-commons-logging.jar;C\:\ \eclipse\\plugins\\org.apache.ant_1.7.0\\lib\\ant-commons-net.jar;C\:\ \eclipse\\plugins\\org.apache.ant_1.7.0\\lib\\ant-jai.jar;C\:\\eclipse\ \plugins\\org.apache.ant_1.7.0\\lib\\ant-javamail.jar;C\:\\eclipse\ \plugins\\org.apache.ant_1.7.0\\lib\\ant-jdepend.jar;C\:\\eclipse\ \plugins\\org.apache.ant_1.7.0\\lib\\ant-jmf.jar;C\:\\eclipse\\plugins\ \org.apache.ant_1.7.0\\lib\\ant-jsch.jar;C\:\\eclipse\\plugins\ \org.apache.ant_1.7.0\\lib\\ant-junit.jar;C\:\\eclipse\\plugins\ \org.apache.ant_1.7.0\\lib\\ant-launcher.jar;C\:\\eclipse\\plugins\ \org.apache.ant_1.7.0\\lib\\ant-netrexx.jar;C\:\\eclipse\\plugins\ \org.apache.ant_1.7.0\\lib\\ant-nodeps.jar;C\:\\eclipse\\plugins\ \org.apache.ant_1.7.0\\lib\\ant-starteam.jar;C\:\\eclipse\\plugins\ \org.apache.ant_1.7.0\\lib\\ant-stylebook.jar;C\:\\eclipse\\plugins\ \org.apache.ant_1.7.0\\lib\\ant-swing.jar;C\:\\eclipse\\plugins\ \org.apache.ant_1.7.0\\lib\\ant-testutil.jar;C\:\\eclipse\\plugins\ \org.apache.ant_1.7.0\\lib\\ant-trax.jar;C\:\\eclipse\\plugins\ \org.apache.ant_1.7.0\\lib\\ant-weblogic.jar;C\:\\eclipse\\plugins\ \org.apache.ant_1.7.0\\lib\\ant.jar;C\:\\eclipse\\plugins\ \org.apache.ant_1.7.0\\lib\\commons-net-1.4.1.jar;C\:\\eclipse\\plugins \\org.apache.ant_1.7.0\\lib\\jakarta-oro-2.0.8.jar;C\:\\eclipse\ \plugins\\org.apache.ant_1.7.0\\lib\\xercesImpl.jar;C\:\\eclipse\ \plugins\\org.apache.ant_1.7.0\\lib\\xml-apis.jar;C\:\\eclipse\ \configuration\\org.eclipse.osgi\\bundles\\10\\1\\.cp\\lib\ \remoteAnt.jar;C\:\\IBM\\WebSphere\\AppServer\\java\\lib\\tools.jar;C\: \\eclipse\\plugins\\org.eclipse.swt.win32.win32.x86_3.2.2.v3235a.jar [echoproperties] java.class.version=3D49.0 [echoproperties] java.endorsed.dirs=3DC\:\\Program Files\\Java\ \jre1.5.0_06\\lib\\endorsed [echoproperties] java.ext.dirs=3DC\:\\Program Files\\Java\\jre1.5.0_06\ \lib\\ext [echoproperties] java.home=3DC\:\\Program Files\\Java\\jre1.5.0_06 [echoproperties] java.io.tmpdir=3DC\:\\DOCUME~1\\WalkeD\\LOCALS~1\\Temp\ \ [echoproperties] java.library.path=3DC\:\\WINDOWS\\system32;.;C\:\ \WINDOWS\\system32;C\:\\WINDOWS;C\:\\Program Files\\IBM\\WebSphere MQ\ \Java\\lib;C\:\\WINDOWS\\system32;C\:\\WINDOWS;C\:\\WINDOWS\\System32\ \Wbem;C\:\\Program Files\\IBM\\IBM CICS Transaction Gateway\\BIN;C\:\ \apache-ant-1.7.0\\bin;C\:\\j2sdk1.4.1_01\\bin;C\:\\Program Files\\IBM\ \WebSphere MQ\\bin;C\:\\Program Files\\IBM\\WebSphere MQ\\WEMPS\\bin;C \:\\Program Files\\TextPad 4;C\:\\Program Files\\PuTTY;C\:\\PROGRA~1\ \IBM\\SQLLIB\\BIN;C\:\\PROGRA~1\\IBM\\SQLLIB\\FUNCTION;C\:\\PROGRA~1\ \IBM\\SQLLIB\\SAMPLES\\REPL;;C\:\\Program Files\\Visual Explain\\lib;C \:\\Program Files\\CVSNT\\;C\:\\eclipse\\configuration\ \org.eclipse.osgi\\bundles\\718\\1\\.cp [echoproperties] java.runtime.name=3DJava(TM) 2 Runtime Environment, Standard Edition [echoproperties] java.runtime.version=3D1.5.0_06-b05 [echoproperties] java.specification.name=3DJava Platform API Specification [echoproperties] java.specification.vendor=3DSun Microsystems Inc. [echoproperties] java.specification.version=3D1.5 [echoproperties] java.vendor=3DSun Microsystems Inc. [echoproperties] java.vendor.url=3Dhttp\://java.sun.com/ [echoproperties] java.vendor.url.bug=3Dhttp\://java.sun.com/cgi-bin/ bugreport.cgi [echoproperties] java.version=3D1.5.0_06 [echoproperties] java.vm.info=3Dmixed mode [echoproperties] java.vm.name=3DJava HotSpot(TM) Client VM [echoproperties] java.vm.specification.name=3DJava Virtual Machine Specification [echoproperties] java.vm.specification.vendor=3DSun Microsystems Inc. [echoproperties] java.vm.specification.version=3D1.0 [echoproperties] java.vm.vendor=3DSun Microsystems Inc. [echoproperties] java.vm.version=3D1.5.0_06-b05 [echoproperties] line.separator=3D\r\n [echoproperties] os.arch=3Dx86 [echoproperties] os.name=3DWindows XP [echoproperties] os.version=3D5.1 [echoproperties] outputFile=3DdailyTransactions.out.txt [echoproperties] path.separator=3D; [echoproperties] schema=3Disdb1 [echoproperties] sql=3Dconnect to db0z user dmfstr1 using dfstr101; SET SCHEMA isdb1; Select count (*) from isdb1.SUBTRANSACTION s, isdb1.subtransactiontype st where s.SUBTRANSACTIONTYPE_SUBTRANSA12 \=3D st.subtransactiontypeid and s.subtransactionstatusid \=3D 2 and st.SUBTRANSACTIONMODULEID in (1,2,5,7,8,9) and s.createdon between '2007-04-09 00\:01\:01.000000' and '2007-04-09 23\:59\:01.424000';\t \t \t quit; [echoproperties] sqlCommands=3DtransactionCount.sql [echoproperties] sun.arch.data.model=3D32 [echoproperties] sun.boot.class.path=3DC\:\\Program Files\\Java\ \jre1.5.0_06\\lib\\rt.jar;C\:\\Program Files\\Java\\jre1.5.0_06\\lib\ \i18n.jar;C\:\\Program Files\\Java\\jre1.5.0_06\\lib\\sunrsasign.jar;C \:\\Program Files\\Java\\jre1.5.0_06\\lib\\jsse.jar;C\:\\Program Files\ \Java\\jre1.5.0_06\\lib\\jce.jar;C\:\\Program Files\\Java\\jre1.5.0_06\ \lib\\charsets.jar;C\:\\Program Files\\Java\\jre1.5.0_06\\classes [echoproperties] sun.boot.library.path=3DC\:\\Program Files\\Java\ \jre1.5.0_06\\bin [echoproperties] sun.cpu.endian=3Dlittle [echoproperties] sun.cpu.isalist=3D [echoproperties] sun.desktop=3Dwindows [echoproperties] sun.io.unicode.encoding=3DUnicodeLittle [echoproperties] sun.jnu.encoding=3DCp1252 [echoproperties] sun.management.compiler=3DHotSpot Client Compiler [echoproperties] sun.os.patch.level=3DService Pack 2 [echoproperties] today=3D2007-04-09 [echoproperties] user.country=3DUS [echoproperties] user.dir=3DC\:\\eclipse_workspace\\massSQL [echoproperties] user.home=3DC\:\\Documents and Settings\\WalkeD [echoproperties] user.language=3Den [echoproperties] user.name=3Dwalked2 [echoproperties] user.timezone=3D [echoproperties] user.variant=3D [echoproperties] userName=3D******** [echoproperties] userPass=3D******** query: [delete] Could not find file C:\eclipse_workspace\massSQL \dailyTransactions.out.txt to delete. [exec] Current OS is Windows XP [exec] Error redirected to C:\eclipse_workspace\massSQL \dailyTransactionsError.txt [exec] Executing 'cmd.exe' with arguments: [exec] '/c db2cmd db2 -tx connect to db0z user ******* using *******; SET SCHEMA isdb1; Select count (*) from isdb1.SUBTRANSACTION s, isdb1.subtransactiontype st where s.SUBTRANSACTIONTYPE_SUBTRANSA12 =3D st.subtransactiontypeid and s.subtransactionstatusid =3D 2 and st.SUBTRANSACTIONMODULEID in (1,2,5,7,8,9) and s.createdon between '2007-04-09 00:01:01.000000' and '2007-04-09 23:59:01.424000'; quit; -z dailyTransactions.out.txt' [exec] [exec] The ' characters around the executable and arguments are [exec] not part of the command. [sleep] sleeping for 20000 milliseconds BUILD SUCCESSFUL Total time: 20 seconds the contents of the folowing files are being used. =3D=3D=3Dcount.xml=3D=3D=3D(pass and username have been blanked for = posting) =3D=3D=3Dtransactioncount.sql=3D=3D=3D connect to DATABASE user THEUSERNAME using THEPASSWORD; SET SCHEMA THESCHEMA; Select count (*) from THESCHEMA.SUBTRANSACTION s, THESCHEMA.subtransactiontype st where s.SUBTRANSACTIONTYPE_SUBTRANSA12 =3D st.subtransactiontypeid and s.subtransactionstatusid =3D 2 and st.SUBTRANSACTIONMODULEID in (1,2,5,7,8,9) and s.createdon between 'THEDATE 00:01:01.000000' and 'THEDATE 23:59:01.424000'; quit; --=20 __________________________________ No matter how responsible he may seem, Never give your Gun to a Monkey. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org