Job Start Date from Unix

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
ssh023
Participant
Posts: 18
Joined: Tue Nov 21, 2006 9:14 pm

Job Start Date from Unix

Post by ssh023 »

Is there any way I could get the last ran date for a particular job from the command line? I know DSJobStartDate gives the date, I dont have a clear idea about using it from the comman line. Can you guys please help me with the syntax??
Regards,
ssh023
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

the command "dsjob -jobinfo {project} {job}" will give several lines of output, grep for "Job Start Time"
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

... which you can isolate using grep or some similar utility.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ssh023
Participant
Posts: 18
Joined: Tue Nov 21, 2006 9:14 pm

Post by ssh023 »

Thanks Arnrd and Ray for the replies, I used the mentioned command and I am getting the Last Run Time in the below format if I do a Grep on the output for the Job Start Date

'Last Run Time: Month Day Year hh:mm:ss' (eg Jan 8 2008 00:00:00)

I want JobstartDate in the 'YYYYMMDDhhmmss' format. Is there a way I can achieve this? Please help!!!
Regards,
ssh023
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can't extract it in that format. But your script can re-arrange the components of what you can extract. All the bits you need are there.

If you need to learn/hire some scripting skills, then so be it.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You can use 'cut' to get the pieces and then put them together any way you want. Best to ask a colleague for scripting help, quicker that way.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply