DSJobStartTimestamp value not updating

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
anntaylor
Participant
Posts: 24
Joined: Tue May 10, 2005 5:17 pm

DSJobStartTimestamp value not updating

Post by anntaylor »

I am setting the initial value of a stage variable to Macro DSJobStartTimestamp.

I am having an issue where the value updates intermitantly. It will be the same for three executions (command line), then update on the next run.

Has anyone run into a similar scenario.


Of lesser concern, I am interested where this timestamp is derived. It does not appear to be from the Server.

Thanks
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

From the DSINCLUDE file in your project, the JobControl.h record:

Code: Select all

LIST.ITEM DSINCLUDE 11:06:25am  23 Feb 2006  PAGE   28
353 $IfNDef DSJobStartTimestamp
354    $Define DSJobStartTimestamp DSGetJobInfo(DSJ.ME, DSJ.JOBSTARTTIMESTAMP)
The macro is a call to the DSGetJobInfo function from within the job for the job start timestamp. I couldn't tell you why multiple independent runs would have the same value, as the logic shows this is probably not possible. Ultimately, you may need to call this in to Tech Support.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
anntaylor
Participant
Posts: 24
Joined: Tue May 10, 2005 5:17 pm

Post by anntaylor »

This ended up being a bug. The macro was instead returning the datetime of the last compilation.

As a workaround, IBM supplied
OCONV(@DATE,"DYMD-[4,2,2"):" ":OCONV(@TIME,"MTS")
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If you initialize the stage variable, and don't provide a derivation expression, it will retain its initial value throughout the job run.
Whether you initialize it from the macro, or from the expression, is up to you. Incidentally there's a typo in the previous post; a right bracket is missing in the date conversion specification. It should be

Code: Select all

Oconv(@DATE,"D-YMD[4,2,2]"):" ":Oconv(@TIME,"MTS:") 
Note also that this expression can be used in a job sequence, but not in a parallel job, where the Oconv() function is not available. Did IBM mention that? You have to calculate in a job sequence and pass to the 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.
Post Reply