#!/usr/bin/perl # Initialize Server Specific Variables $server = ; $user = ; $password = ; $omnihome = "/app/netcool/omnibus"; # Initialize Variables that define SQL Login Commands $sqsh_string = "${omnihome}/bin/nco_sql.sqsh -server $server -user $us +er -password $password"; #---------------------------------------------------------- # Script Body #---------------------------------------------------------- #$running = `$test`; # Initialize SQL Action Statements $sql_select_Procedure = "select ProcedureName, SQLBlock from persist.p +rocedures"; # Select ProcedureName and SQLBLock &GetRawProcedureData; %val = split(/_yvs_kj_/, $raw_data); while (($name, $code) = each (%val)) { open (FILE, $name) or die ("jhand"); print FILE $code; print "$name\n"; print "$code\n"; } close FILE; #---------------------------------------------------------- # Subroutines #---------------------------------------------------------- sub GetRawProcedureData { $raw_data = `$sqsh_string <<'EOF'; $sql_select_Procedure go quit EOF`; }