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
vputta
Premium Member
Posts: 47 Joined: Wed Oct 08, 2008 7:35 am
Location: Charlotte
Post
by vputta » Tue Sep 20, 2011 2:34 pm
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
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Tue Sep 20, 2011 3:01 pm
It is not possible to set a job parameter value once the job is running.
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
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Tue Sep 20, 2011 5:51 pm
To use the "timestamp when the job started" in the job itself, use the DSJobStartTimestamp macro rather than a job parameter.
-craig
"You can never have too many knives" -- Logan Nine Fingers
vputta
Premium Member
Posts: 47 Joined: Wed Oct 08, 2008 7:35 am
Location: Charlotte
Post
by vputta » Wed Sep 21, 2011 6:55 am
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
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Wed Sep 21, 2011 7:01 am
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.
-craig
"You can never have too many knives" -- Logan Nine Fingers