Inserting Parameter Value into Oracle Stage forHeaderTrailer
Posted: Mon Nov 19, 2007 7:24 pm
I have a 4 jobs, 3 jobs which take a parameter from 4th job contrl, which is used in sql in each header, data and trialer job for each distinct value of parameter
I am trying to use utilityjobrun in basic transformer stage, I get fatal error mesage that the parameter not found in job,
UtilityRunJob("Header", 'Param1=':trim(lnk146.Record), 0, 0)
I am assuming the value is being assigned to Param1 in the ctrl job
Param1 is the parameter in sql query for header data and trailer jobs and is in where clause with #Param1#
I have tried a lot, not able to figure it out, please help very much appreciated
Alternatively, I am trying to use dsattachjob, dssetparam, dsjobrun, dswaitforjob and dsdettachjob in basic transformer stage, I am not getting the syntax correct, I am using 8.0.1 enterprise and follwoing is code
$INCLUDE DSINCLUDE JOBCONTROL.H
EntityVal=trim(link413.record)
DSAttachJob("Header_File", DSJ.ERRWARNING)
DSSetParam (Handle, "Param1", Parameter1)
DSRunJob(Handle, DSJ.RUNNORMAL)
DSWaitForJob (Handle)
DSDetachJob (Handle)
I have not yet included other 2 files data and trailer
pls let me know what wrong here, What should I be doing to accomplish this.
Please help, I tried to search the forum, not able to fig it out
Raj
I am trying to use utilityjobrun in basic transformer stage, I get fatal error mesage that the parameter not found in job,
UtilityRunJob("Header", 'Param1=':trim(lnk146.Record), 0, 0)
I am assuming the value is being assigned to Param1 in the ctrl job
Param1 is the parameter in sql query for header data and trailer jobs and is in where clause with #Param1#
I have tried a lot, not able to figure it out, please help very much appreciated
Alternatively, I am trying to use dsattachjob, dssetparam, dsjobrun, dswaitforjob and dsdettachjob in basic transformer stage, I am not getting the syntax correct, I am using 8.0.1 enterprise and follwoing is code
$INCLUDE DSINCLUDE JOBCONTROL.H
EntityVal=trim(link413.record)
DSAttachJob("Header_File", DSJ.ERRWARNING)
DSSetParam (Handle, "Param1", Parameter1)
DSRunJob(Handle, DSJ.RUNNORMAL)
DSWaitForJob (Handle)
DSDetachJob (Handle)
I have not yet included other 2 files data and trailer
pls let me know what wrong here, What should I be doing to accomplish this.
Please help, I tried to search the forum, not able to fig it out
Raj