Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: reading unix host variables within PL/SQL

Re: reading unix host variables within PL/SQL

From: John Strange <jstrange_at_imtn.dsccc.com>
Date: 1997/06/17
Message-ID: <5o5vdo$910@camelot.dsccc.com>#1/1

You could spool the host commands to create a select statement into a sql file, then run the sql file.  

This is untested. You will have to play with the "'s to get them right. Once it works you could then rewrite it to create a cursor.  

set pagesize 0
spool /tmp/a.com
select "echo ""select \""$LOGNAME\"" from dual;"" > /tmp/a.sql" from dual ; spool off
host (". /tmp/a.com") ;
@/tmp/a.sql
host ("rm /tmp/a.com /tmp/a.sql") ;

rob joss (rob_joss_at_lilly.com) wrote:
: I have not been able to find a way of reading unix host variables from
: either SQLPLUS or within PL/SQL.
 

: Does anyone how to do this?
 

: Thanks

--
This posting represents the personal opinions of the author. It is not the
official opinion or policy of the author's employer. Warranty expired when you
opened this article and I will not be responsible for its contents or use.
Received on Tue Jun 17 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US