Hi,
I have a universe table containing log information, I want to delete records from it in terms of Batch job name, I tried the following code
*************************************************
JobHandle = DSJ.ME
JobName = DSGetJobInfo(JobHandle,DSJ.JOBNAME)
Cmd = "DELETE FROM BJOB_STATUS WHERE Batch_JobName = '" : JobName : "'"
Call DSLogInfo("The sql is " : Cmd, RoutineName)
Execute Cmd Capturing Msg
Call DSLogInfo(Msg, RoutineName)
**************************************************
I found it doesn't work.
Thanks in advance for your advice
xiong[8)]
delete universe records from DS function
Moderators: chulett, rschirm, roy
Hi Xiong,
You haven't exactly included a lot of detail as to what is not working, but I do have a couple of suggestions for you :
Have you remembered the include : $INCLUDE DSINCLUDE JOBCONTROL.H
in your code ?
DSJ.ME is the jobhandle for the current job so you don't do the line:
JobHandle = DSJ.ME
Instead the next line should look like this:
JobName = DSGetJobInfo(DSJ.ME, DSJ.JOBNAME)
HTH
B. Sorensen,
Optico IT ApS
You haven't exactly included a lot of detail as to what is not working, but I do have a couple of suggestions for you :
Have you remembered the include : $INCLUDE DSINCLUDE JOBCONTROL.H
in your code ?
DSJ.ME is the jobhandle for the current job so you don't do the line:
JobHandle = DSJ.ME
Instead the next line should look like this:
JobName = DSGetJobInfo(DSJ.ME, DSJ.JOBNAME)
HTH
B. Sorensen,
Optico IT ApS
xiong
Delete from works fine. I think you forgot the ';'.
Kim.
Kim Duke
DsWebMon - Monitor DataStage over the web
www.Duke-Consulting.com
Delete from works fine. I think you forgot the ';'.
Kim.
Kim Duke
DsWebMon - Monitor DataStage over the web
www.Duke-Consulting.com