I have just had to do something similar, but needed it to be Case Sensitive.
The only solution that I could find that would be Case Sensitive was the SQL solution.
When you JOB a process you can get the ID of the child Process with $ZCHILD.
You can then check to see if that process is still running.
Not sure whether you can HALT the process or not, and depending on what it is you are running, it might not be a good idea.
Certifications & Credly badges:
Oliver has no Certifications & Credly badges yet.
Global Masters badges:
Oliver has no Global Masters badges yet.
Followers:
Oliver has no followers yet.
Following:
Oliver has not followed anybody yet.
For me, if I was faced with 2 possible solutions and was concerned about performance, I would simply test both solutions within a loop and time how long it takes to do n number of loops.
Something like this
{ ClassMethod SolutionA() As %Status
{
set x=9
quit $$$OK
} ClassMethod SolutionB() As %Integer
{
set x=9
quit 1
} ClassMethod TestSolutions()
{
write "SolutionA Start : "_$zdatetime($ztimestamp,3,1,3),!
for i=1:1:90000000 {
set ret=..SolutionA()
}
write "SolutionA End : "_$zdatetime($ztimestamp,3,1,3),!
write "SolutionB Start : "_$zdatetime($ztimestamp,3,1,3),!
for i=1:1:90000000 {
set ret=..SolutionB()
}
write "SolutionB End : "_$zdatetime($ztimestamp,3,1,3),!
} }