Home: Perl Programming Help: Beginner:
How in Perl check ORA_ERROR and ORA_STAT



digioleg54
User

May 2, 2017, 12:46 PM


Views: 1266
How in Perl check ORA_ERROR and ORA_STAT

In UNIX we can check ORA_STAT after certain command
I have a script, which call sub from another script

Code
sub set_default_vales  
{
require 'GetDate.pl';
my ($prog , $proc_dt, $ths_conn) = @_;

my $Reset_All="";#check real value in dte.env

if (! defined $proc_dt)
{
my $conn = 1;
my $result = &get_processing_date($ths_conn);
if ($result == "oracle error")
{
do{
sleep(300);
$result = &get_processing_date($ths_conn);
$conn ++;
}while ($result == "oracle error" && $conn lt 3)
}
}
}

and in that sub we have

Code
sub set_default_vales  
{
require 'GetDate.pl';
my ($prog , $proc_dt, $ths_conn) = @_;

my $Reset_All="";#check real value in dte.env

if (! defined $proc_dt)
{
my $conn = 1;
my $result = &get_processing_date($ths_conn);
if ($result == "oracle error")
{
do{
sleep(300);
$result = &get_processing_date($ths_conn);
$conn ++;
}while ($result == "oracle error" && $conn lt 3)
}
}
}


My questions is how can I check ORA_ERROR and ORA_STAT, when return to first sub?

Thanks