Hi Experts Team,
I am looking for information and expert ideas how to to delete the the data in Batches, capture and update the deleted Batch information saying Batch 1 completed Batch 2 completed and so on keeping the history data which all processed and deleted mark as success in Temp table and during failure job should rerun from failure batches..
We are getting the data which needs to get deleted in file which we are loading in the temp file and do the join from source table and perform the delete with commit count
This was the logic I was thinking for Batch deletion not sure this was the correct way or you have a better suggestion..
I know this can be done easily with ETL and Informatica and front tool.. But here We need to write some hand code logic script
I will add 3 column in Temp table SED_ID(Auto generated), STATUS = 'F' Char(1) - (Default Set to F) and STATUS_DATE (Time stamp) (Default set to time stamp)
Temp table where condition will change to following - for the Batch of 100
where STATUS = 'F' and seq_id >=0 and SEQID <= 100
once the deletion get completed, after that update will perform in temp table with above condition which will mark 1 batch of seq_id >=0 and SEQID <= 100 Status Column to C
and next batch will start from seq_id > 100 and SEQID <= 200 so on..
Please let me know you have better suggestion to complete this kind of activity...
------------------------------
PRASHANT SHIVMATH
------------------------------
#Db2