RE: Running unix command from Pro*C

RE: Running unix command from Pro*C

 

  


You're looking for putenv() not system(). If you call system() it will
fork another shell, where you would set an environment variable where it
would promptly exit and be lost forever. putenv() will manipulate the
current environment.

S-


On Fri, 10 Sep 2004, Chris Hagemaier wrote:

> Ananda-
> You can use the system() function for this.
> Chris
>
> -----Original Message-----
> From: ananda
> [mailto:oracledba-ezmlmshield-x22666088.[Email address protected]
> Sent: Thursday, September 09, 2004 10:02 PM
> To: LazyDBA Discussion
> Subject: Running unix command from Pro*C
>
>
> Dear friends,
>
> Is it possible to run unix command from within the Pro*C program. I need
> to set some environment variables (for setting env of forms 6i) from
> within the Pro*C program so that it can run form applications.
>
> Regards
> Ananda Basak
> DISCLAIMER: The information contained in this message is intended only and
> solely for the addressed individual or entity indicated in this message and
> for the exclusive use of the said addressed individual or entity indicated
> in this message (or responsible for delivery
> of the message to such person) and may contain legally privileged and
> confidential information belonging to Tata Consultancy Services Limited. It
> must not be printed, read, copied, disclosed, forwarded, distributed or used
> (in whatsoever manner) by any person other than the
> addressee. Unauthorized use, disclosure or copying is strictly prohibited
> and may constitute unlawful act and can possibly attract legal action, civil
> and/or criminal.
> The contents of this message need not necessarily reflect or endorse the
> views of Tata Consultancy Services Limited
> on any subject matter. Any action taken or omitted to be taken based on this
> message is entirely at your risk and neither the originator of this message
> nor Tata Consultancy Services Limited takes any responsibility or liability
> towards the same. Opinions, conclusions and any other
> information contained in this message that do not relate to the official
> business of Tata Consultancy Services Limited shall be understood as neither
> given nor endorsed by Tata Consultancy Services Limited or any affiliate of
> Tata Consultancy Services Limited. If you have received this message in
> error,
> you should destroy this message and may please notify the sender by e-mail.
> Thank you.
>
>
>
> --------
> website: http://www.LazyDBA.com
> Please don't reply to RTFM questions
> Oracle documentation is here: http://tahiti.oracle.com
> To unsubscribe: see http://www.lazydba.com/unsubscribe.html
> To subscribe: see http://www.lazydba.com
> By using this list you agree to these
> terms:http://www.lazydba.com/legal.html
>
>
>
>
> --------
> website: http://www.LazyDBA.com
> Please don't reply to RTFM questions
> Oracle documentation is here: http://tahiti.oracle.com
> To unsubscribe: see http://www.lazydba.com/unsubscribe.html
> To subscribe: see http://www.lazydba.com
> By using this list you agree to these terms:http://www.lazydba.com/legal.html
>
>


Oracle LazyDBA home page