Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How do I pass a filename as variable to procedure?

BillWMar 14 2011 — edited Mar 14 2011
Greetings,

I am using utl_file to open an O/S file on a Solaris box for reading (abbreviated code follows)...

DECLARE
F1 UTL_FILE.FILE_TYPE;
.
.
BEGIN
F1 := UTL_FILE.FOPEN ('DIRECTORY','file_name.txt','R');
--Call to Proc1 here

I would then like to be able to pass that filename to a procedure and make it available there. I can't find an example of how to do that, can someone help me? I know I could use a package but would like to know how to do it wihtout a package.

proc1('HowDoIPassTheFileName?');

Procedure proc1('HowDoIReceiveheFileName?);

Is this possible and if so how?
Thanks
Bill Wagman
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 11 2011
Added on Mar 14 2011
3 comments
770 views