4 # The following exit codes are defined and MUST BE CONSISTENT with the
5 # error codes the library uses:
6 $MR_DBMS_ERR = 47836421;
7 $MR_OCONFIG = 47836460;
9 $outfile = '/moira/dcm/spwatch.out';
13 $dbh = DBI->connect("dbi:Oracle:moira", "moira", "moira")
16 $sth = $dbh->prepare("SELECT m.name FROM printers p, ".
17 "machine m WHERE p.type = 'SAP' AND p.mach_id = ".
18 "m.mach_id ORDER BY m.name") || exit $MR_DBMS_ERR;
20 $sth->execute || exit $MR_DBMS_ERR;
23 open(OUT, ">$outfile") || exit $MR_OCONFIG;
24 print OUT "# This File is automatically generated by Moira. Do not edit.\n";
26 while (($hostname) = $sth->fetchrow_array) {
27 next if $hostname eq "[NONE]";