I had used that. That did not stop the thread from exiting.
Then you must be calling it at the wrong place in the code.
It is difficult to try to help further as the code you have posted has at least
twothree missing close braces.
Neither of these if statement bodies are closed.
if( $serParProcessing eq "P" )
if( $owsagProcessing eq "P" )
Nor is this subroutine.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.