Page 1 of 1

Current TimeStamp as parameter

Posted: Tue Sep 20, 2011 2:34 pm
by vputta
Hi ,

I need to pass Current Timestamp as a parameter to the DS job .
But i am having problem to execute the below code in Job control of the DS job .

--------------------------------------------------------------------------------------
$INCLUDE DSINCLUDE JOBCONTROL.H



Job_Handle=DSJ.ME
JobName=DSGetJobInfo(Job_Handle,DSJ.JOBNAME)

StartTimeStmp = DSGetJobInfo(Job_Handle,DSJ.JOBSTARTTIMESTAMP)

ErrCode = DSSetParam(Job_Handle,"Maint_Date", StartTimeStmp)

return

--------------------------------------------------------------------------------------

Plz suggest ..

Thanks

Posted: Tue Sep 20, 2011 3:01 pm
by ray.wurlod
It is not possible to set a job parameter value once the job is running.

Posted: Tue Sep 20, 2011 5:51 pm
by chulett
To use the "timestamp when the job started" in the job itself, use the DSJobStartTimestamp macro rather than a job parameter.

Posted: Wed Sep 21, 2011 6:55 am
by vputta
I need to use this timestamp parameter in the output sequential file name .
I guess we can do this only through Job execution code .
Plz suggest

-Thanks

Posted: Wed Sep 21, 2011 7:01 am
by chulett
So then it does need to be a job parameter. Pass it in (properly formatted) via a Sequence job. As noted, "Job Control" code runs after the job has started where it is too late to set parameters.