I assume you mean stored procedures. Here's a function that does it for me.
This procedure stored information into the database.

sub UpdateSLIC {
        my ($notice_id, $noticetype, $postdate, $sysstatus, $start_date,
$end_date, $cancelsnotice, $state, $noticetext) = @_;
        
        $ENV{'ORACLE_HOME'} = '/data/app/u01/app/oracle/product/8.0.5';
        $ENV{'TNS_ADMIN'}    = '/var/opt/oracle';

        my $dbname='xxxxxx';
        my $user  ='xxxxxxx';
        my $passwd='xxxxxxx';
        
        $noticetext =~ s/\n/\r\n/g; # for notepad reading
        $state      =~ s/\n//g; # for notepad reading
        $state      =~ s/\r//g; # for notepad reading
        $sysstatus = 'N' if ($sysstatus eq '*');

        my $slh = DBI->connect("dbi:Oracle:$dbname", $user, $passwd);
        if (!$slh) {
                print "Unable to connect to $dbname: $DBI::errstr<br>\n";
                return;
        }       # endif
        
        $sql = qq|BEGIN
sl_pkg_ex_awe.cancel_notice_ILS(to_date('$postdate','MM/DD/YYYY
HH24:MI'),$notice_id,'$sysstatus',to_date('$start_date','MM/DD/YYYY
HH24:MI'),NULL,$cancelsnotice,'$state','$noticetext');END;|;

        my $T = $slh->prepare($sql);    
        $T->execute;
        if ($T->err) {
                print $T->errstr;
        }

        $T->finish; 
        
        $slh->disconnect;

}       # UpdateSLIC

-----Original Message-----
From: Rami Shibli [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 10:49 PM
To: [EMAIL PROTECTED]
Subject: Calling Sorted Procedure


Hello
I need some help regarding sorted procedures on ORACLE; I need to call the
sorted procedure from my application that returns a string. And I don't know
how to do it

Regards
Rami Shibli

Reply via email to