ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rhino" <rhi...@sympatico.ca>
Subject Re: Exec task in Ant 1.6.1
Date Wed, 14 Apr 2004 16:18:25 GMT

----- Original Message ----- 
From: "Matt Benson" <gudnabrsam@yahoo.com>
To: "Ant Users List" <user@ant.apache.org>
Sent: Wednesday, April 14, 2004 10:47 AM
Subject: Re: Exec task in Ant 1.6.1


> --- Rhino <rhino1@sympatico.ca> wrote:
> > - launch a Windows XP command prompt via Start/All
> > Programs/Accessories/Command Prompt
> > - enter the following at the command prompt: db2cmd
> > [This initializes the DB2 command line environment,
> > making the next commands possible; they don't work
> > at a normal command prompt.]
> > - enter the following at the DB2 command prompt: db2
> > connect to sample
> > - enter the following at the DB2 command prompt: db2
> > comment on specific procedure income_proc is 'xyz'
>
> Sounds like db2cmd is the executable, but it is
> interactive, so you really need to send two separate
> commands to a single executable.  If you don't need to
> worry about the output you might be able to do this:
>
> <!-- abbreviate the line separator, courtesy of Jan
> -->
> <property name="br" value="${line.separator}" />
> <exec executable="db2cmd"
>  inputstring="db2 connect to sample${br}db2 comment on
> specific procedure income_proc is 'xyz'" />
>
That was definitely an intriguing idea but it didn't work. It launched a DB2
command window but didn't execute either of the commands in the inputstring.
I checked the comment on the procedure afterwards and it hadn't changed to
the new value. I tried adding an output="db2cmd3.txt" but nothing at all was
written to it.

> You could also use a real line in the buildfile to
> signify the line break in the inputstring attribute,
> OR put the whole thing as two lines in a file and use
> that on the input attribute.  I'd try this general
> approach first; you may get lucky.

Could you clarify both of these approaches please? I don't have a clear idea
of what you mean by either one.

> If you have to use
> something like "exit" as a final command to get out of
> db2cmd, the same approach should apply.
>
That sounds reasonable.

Rhino


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message