Hi
I have developed a simple job loading data from sequential file into database.Job is working fine.I have written a routine to load log in a text file.When i tested it as transform function routine it is working fine.When I converted it to After job subroutine.Job gets aborted.I am not able to compile the job.It give an error " Cannot give mutually exclusive access to job".
In After job subroutine,First parameter is jobname .Second parameter is error.How should I pass the value in the input value column of job properties.Can i give comma and pass the values.
Please help
After job subroutine
Moderators: chulett, rschirm, roy
I haven't seen that error message and am unclear how you could be generating it.
The Before/After job routines have 2 parameters, the first is input to the subroutine and can contain whatever you wish while the 2nd is returned and contains the ErrorCode. If you wish to pass more than one value to a Before/After subroutine you need to put those values into one string and parse them in the routine, i.e. if you wish to pass parameters "JobName" and "TheAnswer" you would call the routine "#JobName#,#TheAnswer#" and in the routine parse the elements using something like "Field(InputArg,',',1)"
The Before/After job routines have 2 parameters, the first is input to the subroutine and can contain whatever you wish while the 2nd is returned and contains the ErrorCode. If you wish to pass more than one value to a Before/After subroutine you need to put those values into one string and parse them in the routine, i.e. if you wish to pass parameters "JobName" and "TheAnswer" you would call the routine "#JobName#,#TheAnswer#" and in the routine parse the elements using something like "Field(InputArg,',',1)"
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Thanks so much for your reply.Now its accepting the jobname as parameter in the after job routine,but its not getting the log into the text file.Job fails with error "unable to attach job".I am using dsattachjob within
routine.
But the routine is working fine when I had it as transform function .I get output in seconds
Please help
routine.
But the routine is working fine when I had it as transform function .I get output in seconds
Please help
Last edited by dsuser08 on Fri Feb 08, 2008 6:52 am, edited 1 time in total.
-
- Participant
- Posts: 78
- Joined: Fri Mar 02, 2007 4:54 am
- Location: CHENNAI
You are probably attaching to the job itself in the after-job routine. Instead of using DSAttachJob(), just use the mnemonic DSJ.ME for the job handle.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>