Hi,
I was developed a job in server edition where i used to get the max date from the universe file by passing the Job name as the paramter.
i have imlimented some thing like
Max(upd_dt_time), and job name will be populated into the hashed file.
by using a routine i used to pass the job name as the parameter.
it suppose to give the max(upd_dt_time) as a return value.
Now my question is since we don't have the hashed file concept in EE.
Can i do the same in the EE as i explained above for server Jobs.
Thanks
Can i get the max run date of Job
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 82
- Joined: Fri Jun 03, 2005 5:23 am
- Location: Bangalore
- Contact:
Can i get the max run date of Job
Rajasekhar
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
There should be no problem generating the Max(upd_dt_time) from a parallel job. You can, indeed, still do this in a server job, and load the result into a hashed file, or the job's user status area. The job sequence can then read it from the hashed file or user status area and supply the value to the parallel job as a job parameter.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
If anyone is using EtlStats then you can even do this in a shell script.
Code: Select all
LastRun=`$DSPath/dssh "LIST JobStatusLastRun '${RealJobName}' EVAL \"convert('-', '', field(@RECORD<4>, ' ', 1))\" ID.SUP COL-HDR-SUPP" | awk '{ if (NR==4) print $1 }'`
LastStat=`$DSPath/dssh "LIST JobStatusLastRun '${RealJobName}' EVAL \"@RECORD<2>\" ID.SUP COL-HDR-SUPP" | awk '{ if (NR==4) print $1 }'`
CurrentDate=$(/bin/date "+%Y%m%d")
if [ $LastRun -eq $CurrentDate ]
then
if [ $LastStat -eq 0 -o $LastStat -eq 1 ]
then
# -----------------------------------------------------------------
# True
# -----------------------------------------------------------------
exit 0
else
# -----------------------------------------------------------------
# False
# -----------------------------------------------------------------
exit 1
fi
else
# -----------------------------------------------------------------
# Unknown
# -----------------------------------------------------------------
exit 1
fi
# -----------------------------------------------------------------
# Unknown
# -----------------------------------------------------------------
exit 1
Mamu Kim