Professional Documents
Culture Documents
1 COMMENTS
# This script is to found out status of all workflows whether they are
# Scheduled or running or unscheduled. If they are unscheduled they will be auto
matically scheduled
# This Script works in a step by step manner
#1. Gather data from PMSERVER
#2. Compare the collected data with master data
#3. And extracting which workflows are scheduled/unscheduled/running
# Constraints :
# 1.User must be an Superuser to run PMCMD command in UNIX
wfdtime="/tmp/wfdtime"
mwf="/infa/informatica/powercenter7/mwf.txt"
fwf="/infa/informatica/powercenter7/fwf.txt"
mwft="/infa/informatica/powercenter7/mwft.txt"
nsch="/tmp/nsch"
if [ $sqlerr -eq 72 ]
then
print "[ $0, $$, $(date "+%m/%d/%Y %H:%M:%S") ]ERROR: Connectin
g to DB Failed"
fi
# Main portion
# The Problem of GREP searching multiple match string is solved using a blank sp
ace after variable for Eg: "$wfvar "
for wf in `cat $mwf`
do
wfvar="$wf"
schwfdtime1=`grep "$wfvar " $wfdtime`
status=$?
schwfdtime=`echo "$schwfdtime1" | sed -n '1p'`
if [ "$status" -eq 0 ] ; then
dstr=`echo "$schwfdtime" | cut -d " " -f 2,3`
tstr=`echo "$schwfdtime" | cut -d " " -f 4`
mtstr=`grep "$wfvar " $mwft | sed -n '1p' | cut -d " " -f 2`
if [ "$mtstr" == "$tstr" ] ; then
if [ "$mdstr" == "$dstr" ] ; then
echo "$dstr" "$tstr" "$wfvar" >>$psch
done
-f 1`
-f "$wf
"for" "
schedul
# End of Prog