ClearDS_RTLogRTStatus - Script & DataStage job to Clear DataStage RTLOG and RTSTATUS
Introduction DataStage job logs and status files can grow huge at times due to system issues or poor design which cause ā¦
This is a utility to scan the DataStage job run logs to find the usage of a given table OR file. We can find where a specific table OR file is used just by running a select query after this utility finishes its initial log load.
Lets see an example, I need to find the list of jobs which hits the table TEMP_FINDJOBSBYKEYWORD and I have to run below query.
SELECT \*
FROM DATASTAGE.TEMP\_FINDJOBSBYKEYWORD A
WHERE UPPER(A.DS\_LOG\_DETAILS) LIKE '%TEMP\_FINDJOBSBYKEYWORD%'
This will give the results with the list of jobs which uses the table and the DS_LOG_DETAIL will have the detailed log with the usage information.
Utility has three steps(Sub Jobs with scripts) which needs to be executed in sequence and below is details of each of steps.
Here we will execute a DataStage jobĀ FindJobsByKeyWord010ext, This DS job job will execute the scriptĀ FindJobsByKeyWord010ext to create log event listing.
dsjob -lprojects
, dsjob -ljobs
andĀ dsjob -logsum
Ā to list all the log summary for all jobsĀ in your server.Here we will execute a DataStage jobĀ FindJobsByKeyWord020ext, This DS job job will execute the scriptĀ FindJobsByKeyWord020ext to get the detailed log.
dsjob -logdetail
Ā to pull the detailed log for all the logHere we will execute a DataStage jobĀ FindJobsByKeyWord030load. This is used to load the detailed log into a ORACLE so that we can query the table to analyze and find information for the logs.
Please find the dsx export and script downloadable here.
Give it a try and let me know your comments and suggestions for future enhancements.
Introduction DataStage job logs and status files can grow huge at times due to system issues or poor design which cause ā¦
In most of the applications with a batch cycle, IT and Business stakeholders will be interested to know the status of ā¦