get the timestamp of the last run of a job

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
aditya
Charter Member
Charter Member
Posts: 41
Joined: Sat May 28, 2005 7:32 am

get the timestamp of the last run of a job

Post by aditya »

Hi All,

I tried to retrieve the timestamp of the last run of the job via the following command

$dsjob -jobinfo project job

The command retrieved the following stats:

Job Status : RUN OK (1)
Job Controller : not available
Job Start Time : Tue Aug 12 14:54:49 2008
Job Wave Number : 3
User Status : not available
Job Control : 0
Interim Status : NOT RUNNING (99)
Invocation ID : not available
Last Run Time : Tue Aug 12 14:55:19 2008
Job Process ID : 0
Invocation List : ABC_DEF_GHI

I have since been able to pipe the output, manipulate and retrieve the timestamp as Aug 12 14:55:19 2008

Is there another method where I could get only the timestamp and in a more standard format of YYYYMMDDHHMMSS

Thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Just keep on going with your transformation. Take that format and switch it around to the one you desire using Iconv/Oconv for the date portion and tack on the time, for example. Then the DIGITS transform could strip out all the extra who-ha you don't seem to want, assuming it is available in PX. Otherwise... Convert, EReplace, Trim, etc.

Or do you need to script all this?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

YYYY-MM-DD HH:MM:SS is THE most standard format for a timestamp, it is defined under ISO 8601.

Your allegedly "more standard" format simply isn't.

Run your result through a sed or awk script to remove all the non-numeric characters (or even tr -d).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply