Page 2 of 2
Posted: Tue Jun 21, 2005 2:23 am
by dhiraj
Hello,
I have the same requirement and is clearing of the status file a safe option to do. Is there some thing that i should be aware of. Also should we clear the status file? can i not delete it?
Chris,
How much did the enhancement from ascential cost you? just curious?
Thanks
Dhiraj
Posted: Tue Jun 21, 2005 2:38 am
by chrisk
Enhancement requests to Ascential do not cost anything! But maybe I'm wrong and that's why my enhancement requests never get included
C.
Posted: Thu Oct 06, 2005 10:14 pm
by kduke
This is a batch job. Not a routine. You will need to disconnect Director from the project to refresh the list of jobs. I in NO way recommend doing this.
USE AT YOUR OWN RISK:
Code: Select all
* ------------------------------------------------------------
* EtlClearInstanceIDs
* Decription:
* This will clear instance IDs.
* USE AT YOUR OWN RISK
* ------------------------------------------------------------
* Parameters:
* 1. JobName
* ------------------------------------------------------------
* Created : 2005-10-05 Kim Greggory Duke
* Last Modified :
* ------------------------------------------------------------
* $INCLUDE DSINCLUDE JOBCONTROL.H
* ------------------------------------------------------------
Ans = ""
open 'DS_JOBS' to DsJobs else
ErrMsg = "Error: Unable to open DS_JOBS"
gosub ErrRtn
goto TheEnd
end
read JobRec from DsJobs, JobName then
JobNo = JobRec<5>
end else
ErrMsg = "Error: Unable to open DS_JOBS"
gosub ErrRtn
goto TheEnd
end
RtLogFile = 'RT_LOG': JobNo
open RtLogFile to RtLog else
ErrMsg = "Error: Unable to open ": RtLogFile
gosub ErrRtn
goto TheEnd
end
* ----------------------------------------------------------------------
* initialize variables
* ----------------------------------------------------------------------
ThisJobName = 'EtlClearInstanceIDs'
ThisDay = convert('-','',oconv(@DATE, "D4-YMD[4,2,2]"))
ThisTime = convert('-','',oconv(@TIME, "MTHS"))
* ------------------------------------------------------------
Cmd = ''
Cmd := 'Delete from '
Cmd := ' RT_STATUS': JobNo :' '
Cmd := 'where '
Cmd := ' EVAL "@RECORD<1>" = ':"'INVOCATION'"
Cmd := ';'
Call DSLogInfo("Execute: " : Cmd, ThisJobName)
execute Cmd capturing output returning RtnCode
Call DSLogInfo("Command Results: " : output, JobName)
* ------------------------------------------------------------
Cmd = ''
Cmd := 'Delete from '
Cmd := ' RT_STATUS': JobNo :' '
Cmd := 'where '
Cmd := ' EVAL "@RECORD<1>" = ':"'JOB'"
Cmd := ';'
Call DSLogInfo("Execute: " : Cmd, ThisJobName)
execute Cmd capturing output returning RtnCode
Call DSLogInfo("Command Results: " : output, JobName)
* ------------------------------------------------------------
Cmd = ''
Cmd := 'Delete from '
Cmd := ' RT_STATUS': JobNo :' '
Cmd := 'where '
Cmd := ' EVAL "@RECORD<1>" = ':"'STAGE'"
Cmd := ';'
Call DSLogInfo("Execute: " : Cmd, ThisJobName)
execute Cmd capturing output returning RtnCode
Call DSLogInfo("Command Results: " : output, JobName)
* ------------------------------------------------------------
goto TheEnd
* ------------------------------------------------------------
ErrRtn:
Call DSLogInfo(ErrMsg , "JobControl")
* Call DSLogFatal(ErrMsg, "JobControl")
* abort
return
* ------------------------------------------------------------
TheEnd:
Posted: Tue Jul 18, 2006 6:11 pm
by kduke
I fixed this code. It does work but still I do not recommend it. I would change it to delete only old records if I was going to use this.