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

Home -> Community -> Usenet -> c.d.o.misc -> Re: newbie: how to use packages

Re: newbie: how to use packages

From: L120bj <l120bj_at_aol.com>
Date: 1998/01/15
Message-ID: <19980115184500.NAA17212@ladder01.news.aol.com>#1/1

>Subject: newbie: how to use packages
>From: "Arthur Habraken" <duri_at_xs4all.nl>
>Date: 1/15/98 10:37AM GMT
>Message-id: <69koki$59b$1_at_news2.xs4all.nl>
>
>I'm trying to learn PL/SQL and I installed Personal Oracle 7 on my PC.
>No I'd like to use UTL_FILE-functions, but it doesn't work. I'm trying to
>output the contents of an ASCII-file to my screen using PL/SQL with the
>following code :
>
>
>declare
> f UTL_FILE.FILE_TYPE;
> b varchar2(1022);
>begin
> f := utl_file.fopen('c:\autoexec.bat', 'r');
> loop
> begin
> utl_file.get_line(f,b);
> dbms_output.put_line(b);
>
> exception
> when no_data_found then
> exit;
> end;
> end loop;
> utl_file.fclose(f);
>end;
>/
>
>When I try to execute this, I get this :
>
>declare
> *
>ERROR at line 1:
>ORA-06550: line 2, column 6:
>PLS-00201: identifier 'UTL_FILE.FILE_TYPE' must be declared
>ORA-06550: line 2, column 6:
>PL/SQL: Item ignored
>ORA-06550: line 5, column 3:
>PLS-00320: the declaration of the type of this expression is incomplete or
>malformed
>ORA-06550: line 5, column 3:
>PL/SQL: Statement ignored
>ORA-06550: line 8, column 25:
>PLS-00320: the declaration of the type of this expression is incomplete or
>malformed
>ORA-06550: line 8, column 7:
>PL/SQL: Statement ignored
>ORA-06550: line 15, column 19:
>PLS-00320: the declaration of the type of this expression is incomplete or
>malformed
>ORA-06550: line 15, column 3:
>PL/SQL: Statement ignored
>
>
>What is going on ? Can anybody help me out please ?
>
>
>Thanks in advance,
>
>Arthur Habraken
>duri_at_xs4all.nl
>
>
>
>
>
>
>
>
>
>
>

Try doing desc utl_file.fopen if this doesn't work then the utl_file package is not installed. If I remember rightly then it is not installed by default. To install it run the script utlfile.sql in the (ORACLE_HOME)/rdbms/admin directory. Email me if you have any problems Received on Thu Jan 15 1998 - 00:00:00 CST

Original text of this message

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