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
Inserting Parameter Value into Oracle Stage forHeaderTrailer
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
In your code you need to assign the result of DSAttachJob to your Handle variable.
The "parameter not found in job" reports that there is no parameter called "Param1" in the job called "Header".
Code: Select all
Handle = DSAttachJob("Header_File", DSJ.ERRWARNING)
RealName = DSGetJobInfo(Handle, DSJ.JOBNAME)
If RealName = DSJE.BADHANDLE
Then
Call DSLogFatal("Can not attach Header_File job", "MyCode")
GoTo ErrorExit
End
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.
ray.wurlod wrote:In your code you need to assign the result of DSAttachJob to your Handle variable.Code: Select all
Handle = DSAttachJob("Header_File", DSJ.ERRWARNING) RealName = DSGetJobInfo(Handle, DS ...[/quote] Thanks Ray, I tried your code, only all the commands are being showed in red in the basic transformer, only RealName = DSGetJobInfo is correct, when I complie I get general sysntax error, I am not sure whats worng, any thoughts... also alternatively I am getting error message when I use Utilityjobrun as Multifile_Job(BASIC_Transformer_497).#2.BASIC_Transformer_497 (fatal error from DSSetParam): Job control fatal error (-3) (DSGetParamInfo) Parameter '0' not found in job Header_Setup I dont understand what it means... pls help
Raj6778
ray.wurlod wrote:In your code you need to assign the result of DSAttachJob to your Handle variable.Code: Select all
Handle = DSAttachJob("Header_File", DSJ.ERRWARNING) RealName = DSGetJobInfo(Handle, DS ...[/quote] Thanks Ray, I tried your code, only all the commands are being showed in red in the basic transformer, only RealName = DSGetJobInfo is correct, when I complie I get general sysntax error, I am not sure whats worng, any thoughts... also alternatively I am getting error message when I use Utilityjobrun as Multifile_Job(BASIC_Transformer_497).#2.BASIC_Transformer_497 (fatal error from DSSetParam): Job control fatal error (-3) (DSGetParamInfo) Parameter '0' not found in job Header_Setup I dont understand what it means... pls help
Raj6778
ray.wurlod wrote:In your code you need to assign the result of DSAttachJob to your Handle variable.Code: Select all
Handle = DSAttachJob("Header_File", DSJ.ERRWARNING) RealName = DSGetJobInfo(Handle, DS ...[/quote] Thanks Ray, I tried your code, only all the commands are being showed in red in the basic transformer, only RealName = DSGetJobInfo is correct, when I complie I get general sysntax error, I am not sure whats worng, any thoughts... also alternatively I am getting error message when I use Utilityjobrun as Multifile_Job(BASIC_Transformer_497).#2.BASIC_Transformer_497 (fatal error from DSSetParam): Job control fatal error (-3) (DSGetParamInfo) Parameter '0' not found in job Header_Setup I dont understand what it means... pls help
Raj6778
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
They are not intended - or indeed able - to be used directly in a BASIC Transformer stage, for example because DSAttachJob is a subroutine, not a function. My code is intended - as I believed yours was - to be used in a server job routine that was invoked from the BASIC Transformer stage.
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.