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
get the timestamp of the last run of a job
Moderators: chulett, rschirm, roy
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?
Or do you need to script all this?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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).
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.