Friday 24 April 2015

JD Edwards scheduler catch up canceller

You’ve all been in this situation.  The scheduler has been down for the weekend (intended or not) and now you need to switch it on…  But it’s painful.  ALL of the jobs are going to launch and play catch up.  You really do not care for running all of the jobs… again… one after the other… duplicates…  What are you going to do?

Well, you could spend the next 3 hours double clicking queues, holding jobs, deleting next jobs setting status’ – but I’m not going to do that.  I’m going to use my fried SQLCowboy to get the job done – yeeeehar!

First statement holds all of the queues for the ones that are being used in your scheduler (note that I did not use active jobs and I also did not limit by machine – which you might need to).

I then enable the scheduler in JDE

Then you can delete the waiting jobs that have been launched by the SCHEDULER user

Then release the queues

update sy910.f986130 set qcqusts = '02' where QCJOBQUE in (
select distinct CASE WHEN sjjobque IS NULL THEN N'QBATCH' WHEN sjjobque = ' ' THEN N'QBATCH' ELSE sjjobque END from sy910.f91300
);
commit;
--ENABLE THE SCHJEDULER NOW IN JDE
--WAIT FOR IT TO CATCH UP, IT CAN TAKE A WHILE

--check for active jobs
select count(1) from svm910.f986110 where jcjobsts = 'W' and jcuser = 'SCHEDULER'  ;

--one you are happy with catchup, delete the W jobs
delete from svm910.f986110 where jcjobsts = 'W' and jcuser = 'SCHEDULER' ;
--activate your queues again
update sy910.f986130
update sy910.f986130 
set qcqusts = '02'
where QCJOBQUE in (
select distinct CASE WHEN sjjobque IS NULL THEN N'QBATCH' WHEN sjjobque = ' ' THEN N'QBATCH' ELSE sjjobque END
from sy910.f91300
);
commit;

select count(1) from svm910.f986110 where jcjobsts = 'W' and jcuser = 'SCHEDULER' ;

delete from svm910.f986110 where jcjobsts = 'W' and jcuser = 'SCHEDULER' ;

update sy910.f986130
set qcqusts = '01'
where QCJOBQUE in (
select distinct CASE WHEN sjjobque IS NULL THEN N'QBATCH' WHEN sjjobque = ' ' THEN N'QBATCH' ELSE sjjobque END
from sy910.f91300
);
commit;
set qcqusts = '01' where QCJOBQUE in (
select distinct CASE WHEN sjjobque IS NULL THEN N'QBATCH' WHEN sjjobque = ' ' THEN N'QBATCH' ELSE sjjobque END from sy910.f91300
);
commit;

2 comments:

Víctor Endara Manosalvas said...


I have problems trying to purge the master report control tables, the F986110 table is big 60Gb and it takes too long to run.


I would like to know if it is possible to use the script SQL to delete data from F986110, F986114 and F986114A. The R9861101 report that debugs these tables can not be executed for the amount of information, even if you set small ranges for deletion.

Beforehand I thank you if you can help me.

Shannon Moir said...

You can delete it all manually, no problems at all. You just need to know the relationships between the tables and also where the actual PDF's are being written - in the DB or file system.

Extending JDE to generative AI