Perl代码看起来像 -
sub report_generation($)
{
Shell_sh $ARGV[0] $conn_string $pm_dir/$FILE
}
$ARGV[0] -- > command line argument of perl script
$conn_string --> used in perl script value define in perl script
my $USR=$ARGV[1];
my $PSS=$ARGV[2];
my $INS=$ARGV[3];
my $conn_string=$USR."/".$PSS."\@".$INS;
$pm_dir/$FILE --> want to give file name with file path "$pm_dir/$FILE"
my $pm_dir="$ENV{'ABP_PM_ROOT'}/interfaces/output/report/$date";
my $FILE= 'FILE_NAME_'.$ARGV[0].'_'.get_timestamp().'.dat';
my $db_conn =DBI->connect( 'dbi:Oracle:'. $INS, $USR, $PSS, {AutoCommit => 0 })|| ExitProcess4 (1,$Function_Name ,$DBI::err, $DBI::errstr );
report_generation($db_conn);