|
|
sybperl-l Archive
Up Prev Next
From: "Lin, Arthur" <arthur at lehman dot com>
Subject: RE: Sybase BCP
Date: Mar 4 2002 8:50PM
Mike,
you look like an instant help desk to us.
your efforts are greatly appreciated.
Regards,
Arthur Lin
-----Original Message-----
From: Michael Peppler [mailto:mpeppler@peppler.org]
Sent: Monday, March 04, 2002 3:46 PM
To: SybPerl Discussion List
Subject: RE: Sybase BCP
Lin, Arthur writes:
>
> Mike,
>
> Does system() inherit exactly same environment ?
Yes.
system is really just a fork/exec...
Michael
> -----Original Message-----
> From: Michael Peppler [mailto:mpeppler@peppler.org]
> Sent: Monday, March 04, 2002 3:34 PM
> To: SybPerl Discussion List
> Subject: RE: Sybase BCP
>
>
> Brad_Ziegler@notes.mdor.state.mn.us writes:
> >
> > Is there any particular reason not to use system( )? I'm not an
expert,
> so
> > I'm curious.
>
> If you use system() you loose the output from the bcp
> command. Depending one the situation this may not be a problem,
> though.
>
> Michael
>
> > Michael Peppler
> > List
> > rg> cc:
> > Sent by: Subject: RE: Sybase
> BCP
> > owner-SYBPERL-L@lis
> > t.cren.net
> >
> >
> > 02/28/02 10:37 AM
> > Please respond to
> > SYBPERL-L
> >
> >
> >
> >
> >
> > Scott Zetlan writes:
> > > Michael Peppler writes:
> > > > Scott Zetlan writes:
> > > > > If you don't need to do any of that, just call the Sybase
> > > > utility -- but
> > > > > don't use system(); open a pipe instead:
> > > > > open (BCP, "bcp... |");
> > > >
> > > > Or you can use backticks:
> > > >
> > > > my $bcp_output = `bcp ....`;
> > > >
> > >
> > > But then you have to wait for the process to complete before you
can
> > examine
> > > its output. Opening a pipe from it allows you to report on the
> progress
> > of
> > > the bulk-copy as it's in progress.
> >
> > Correct, although I suspect that bcp will buffer its output when
> > writing to a pipe, in which case you'll have to wait until 1k has been
> > written to the output before getting any data.
> >
> > > Of course, there's more than one way to do it :) Use whatever
works
> in
> > your
> > > situation.
> >
> > Indeed.
> >
> > Michael
> > --
> > Michael Peppler Data Migrations, Inc.
> > mpeppler@peppler.org *or* mpeppler@mbay.net
> > http://www.mbay.net/~mpeppler
> > International Sybase User Group: http://www.isug.com
> >
> >
> >
> >
>
> --
> Michael Peppler Data Migrations, Inc.
> mpeppler@peppler.org *or* mpeppler@mbay.net
> http://www.mbay.net/~mpeppler
> International Sybase User Group: http://www.isug.com
>
>
>
>
----------------------------------------------------------------------------
--
> This message is intended only for the personal and confidential use of
the designated recipient(s) named above. If you are not the intended
recipient of this message you are hereby notified that any review,
dissemination, distribution or copying of this message is strictly
prohibited. This communication is for information purposes only and should
not be regarded as an offer to sell or as a solicitation of an offer to buy
any financial product, an official confirmation of any transaction, or as an
official statement of Lehman Brothers. Email transmission cannot be
guaranteed to be secure or error-free. Therefore, we do not represent that
this information is complete or accurate and it should not be relied upon as
such. All information is subject to change without notice.
>
--
Michael Peppler Data Migrations, Inc.
mpeppler@peppler.org *or* mpeppler@mbay.net
http://www.mbay.net/~mpeppler
International Sybase User Group: http://www.isug.com
------------------------------------------------------------------------------
This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice.
|