EricShoemaker608888

CANCEL_UC_OBJECT not always working ?

Discussion created by EricShoemaker608888 on Aug 22, 2017
Latest reply on Aug 22, 2017 by Peter WIRFS

Has anyone experienced that the   CANCEL_UC_OBJECT  function does not always work?

Not that we use it a lot, there are times when it is useful .   We can see in the Agent Log that the commands were issued., but it remains active in the console.

2017-08-22 08:46:19 - U02004045 Cancel job 'JOBS.RR1.100@ASC_SCC7_IMP$UC4' with RunID '349603298'.

And the reason we are using the  CANCEL_UC_OBJECT object in a separate launched job, is that the MRT exceeded option with Cancel/Quit option does not seem to work in this case.

Need to mention the MRT job is an SAP job

Testing against a Windows job seems to work fine.

ar02t0zj1tp3.jpg

 

The Kill.ME code is very simple.

:READ &UC_CAUSE_NAME,,
:READ &UC_CAUSE_NR,,
:READ &UC_CAUSE_STATE,,
:READ &UC_CAUSE_RETCODE,,

:PRINT "Causing task:"
:PRINT "Name: &UC_CAUSE_NAME"
:PRINT "RunID: &UC_CAUSE_NR"
:PRINT "Status: &UC_CAUSE_STATE"
:PRINT "Return code: &UC_CAUSE_RETCODE"

:SET &STATUS# = CANCEL_UC_OBJECT(&UC_CAUSE_NR,"ENDED_TIMEOUT")
:Print "STATUS:  &STATUS#"


Outcomes