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
Multi instance job logs
Moderators: chulett, rschirm, roy
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:
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:
Mamu Kim