Skip to content

Instantly share code, notes, and snippets.

View earnhardt3rd's full-sized avatar

frank.earnhardt earnhardt3rd

View GitHub Profile
require 'getopts.pl';
Getopts('m:d:t');
my $MODE = uc($opt_m) || "";
my $DEBUG = $opt_d || 0;
if (defined $opt_t) { my %TEST = &D_USD_SA_POLICY();}
1;
sub D_USD_SA_POLICY {
my $cRef = $_[0];
my $dFile = $_[1];
my $ret_msg = "Export Web Service SA Policy";
require 'getopts.pl';
Getopts('m:d:t');
my $MODE = uc($opt_m) || "";
my $DEBUG = $opt_d || 0;
if (defined $opt_t) { my %TEST = &D_USD_SEV_1_NOTIFICATIONS();}
1;
sub D_USD_SEV_1_NOTIFICATIONS {
my $cRef = $_[0];
my $dFile = $_[1];
my $ret_msg = "Export Special Sev1 Notifications";
require 'getopts.pl';
Getopts('m:d:t');
my $MODE = uc($opt_m) || "";
my $DEBUG = $opt_d || 0;
if (defined $opt_t) { my %TEST = &ENV_2_HASH();}
1;
sub ENV_2_HASH {
my $env_tag = shift || "PATH";
my $env_sep = shift || "";
my $env_trn = shift || "";
require 'getopts.pl';
Getopts('m:d:t');
my $MODE = uc($opt_m) || "";
my $DEBUG = $opt_d || 0;
if (defined $opt_t) { my %TEST = &execSQL();}
1;
sub execSQL {
my $SQL = shift || "";
my $DBMS_HOST = shift || $_DBMS{"HOST"} . "\." . $_DBMS{"DOMAIN"};
my $DBMS_USER = shift || $_DBMS{"USER"};
require 'getopts.pl';
Getopts('m:d:t');
my $MODE = uc($opt_m) || "";
my $DEBUG = $opt_d || 0;
if (defined $opt_t) { my %TEST = &File();}
1;
sub File {
###########################################################################
#REMC# File -- return file portion of pathname (either ".../..." or "...\...")
#REMC# arg0 = string to be processed
require 'getopts.pl';
Getopts('m:d:t');
my $MODE = uc($opt_m) || "";
my $DEBUG = $opt_d || 0;
if (defined $opt_t) { my %TEST = &findMatch();}
1;
sub findMatch {
my $token = shift || "";
my $time = shift || "";
my $cron = shift || "";
require 'getopts.pl';
Getopts('m:d:t');
my $MODE = uc($opt_m) || "";
my $DEBUG = $opt_d || 0;
if (defined $opt_t) { my %TEST = &findStrInFile();}
1;
sub findStrInFile {
my $sFile = shift || "";
my $sCom = shift || "";
my $sStr = shift || "";
sub fromARRAY {
print " =============== FROM ARRAY ===============\n" if $DEBUG > 0;
my @ARRAY = @_;
my @RETURN;
my $ans="";
if ($MODE ne "NO-PROMPT") {
for (my $i=0;$i<=scalar(@ARRAY)-1 ;$i++) {
my $c = $i+1;
printf " %-4s %-s\n",$c,$ARRAY[$i];
}
require 'getopts.pl';
Getopts('m:d:t');
my $MODE = uc($opt_m) || "";
my $DEBUG = $opt_d || 0;
if (defined $opt_t) { my %TEST = &fromARRAY();}
1;
sub fromARRAY {
print " =============== FROM ARRAY ===============\n" if $DEBUG > 0;
my @ARRAY = @_;
if (scalar(@ARRAY) <= 0) {return;}
require 'getopts.pl';
Getopts('m:d:t');
my $MODE = uc($opt_m) || "";
my $DEBUG = $opt_d || 0;
if (defined $opt_t) { my %TEST = &fromARRAY_NOEXIT();}
1;
sub fromARRAY_NOEXIT {
print " =============== FROM ARRAY ===============\n" if $DEBUG > 0;
my @ARRAY = @_;
my @RETURN;