/:perl -v
This is perl, v5.8.8 built for x86_64-linux-thread-multi
####
} elsif ($stepType eq 'pl') {
$rc = system("perl $cwd/bin/$step -config=$configFile");
}
##
##
sub dbConnect(){
238 my ($dbName) = @_;
239 my ($dbh,$dbUser,$dbPass);
240 my $tempStr;
241
242 LogStatus "Retrieving $dbName login info";
243
244 $tempStr = `pwd`;
245 LogStatus "tempStr1: $tempStr";
246
247 $tempStr = `/prod/scripts/getDBlogin abc01`;
248 LogStatus "tempStr: $tempStr";
249 #($dbUser,$dbPass) = split(/\s/,`/prod/scripts/getDBlogin "$dbName"`);
250 ($dbUser,$dbPass) = split(/\s/, $tempStr);
251 LogStatus "User for $dbName is $dbUser";
252
253 die "$0: Could not find password for $dbUser" unless(defined($dbPass));
254
255 $dbh = DBI->connect("dbi:DB2:$dbName", $dbUser, $dbPass, {AutoCommit=> 0, RaiseError => 1})
256 || die "Can't connect to $database: $DBI::errstr";
257
258 LogStatus "Connected to $dbName as $dbUser";
259
260 return $dbh;
261 }
##
##
1 #!/bin/ksh
2
3 dbname=$1
4 idfl=~/$$.idfl
5 grep -i "$dbname " ~/.passwd > $idfl
6 userid=$(cut -f2 -d" " $idfl)
7 pswrd=$(cut -f3 -d" " $idfl)
8
9 rm $idfl
10
11 print "$userid $pswrd"
##
##
365 [2010-05-12 15:12:13] =========================================================
366 [2010-05-12 15:12:13] Script: create_amb_model
367 [2010-05-12 15:12:13] Process Id: 30199
368 [2010-05-12 15:12:13] Start time: Wed May 12 15:12:13 2010
369 [2010-05-12 15:12:13] =========================================================
370 [2010-05-12 15:12:13]
371 [2010-05-12 15:12:13] DDS AMB Model Creation Starting
372 [2010-05-12 15:12:13] Job name: create_amb_model
373 [2010-05-12 15:12:13] Job config: /jobs/dds/create_amb_model/config/job.config
374 [2010-05-12 15:12:13] Options: 1
375 [2010-05-12 15:12:13] executing step 1 (dds_prod_pg_load.pl)
376 [2010-05-12 15:12:13] Configuration details:
377 [2010-05-12 15:12:13] Config file: /jobs/dds/create_amb_model/config/job.config
378 [2010-05-12 15:12:13] Days back: 365
379 [2010-05-12 15:12:13] Database: abc01
380 [2010-05-12 15:12:13] Retrieving abc01 login info
381 [2010-05-12 15:12:13] tempStr1: /jobs/dds/create_amb_model
382 [2010-05-12 15:12:16] Run job has FAILED
383 [2010-05-12 15:12:16] ERROR:
384 [2010-05-12 15:12:16]
385 [2010-05-12 15:12:16] =========================================================
386 [2010-05-12 15:12:16] Process Id: 30199
387 [2010-05-12 15:12:16] End time: Wed May 12 15:12:16 2010
388 [2010-05-12 15:12:16] Elapsed time: 3 seconds
389 [2010-05-12 15:12:16] CPU time: 0.08 seconds
390 [2010-05-12 15:12:16] =========================================================