Kill persistens procedure

Hello everybody,

I am new at OE hives and have a question about killing persistent procedures, where I only know the programm.p name.
Is there a code sample, where I am able to say, that I want to kill the persistent procedure xy.p like within the procedure object viewer?
In development, I often modify persistens procedures and everytime before I can test the modification, I have to kill the persistent procedure manually.

Thank you in advance

Daniel


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

enumerate running procedures (plus how to delete a procedure)

DEFINE VARIABLE hRunningProcedure AS HANDLE NO-UNDO.
DEFINE VARIABLE cProcedureToDelete AS CHARACTER NO-UNDO INITIAL "sdghsdgfjhdgj".
hRunningProcedure = SESSION:FIRST-PROCEDURE.

DO WHILE VALID-HANDLE(hRunningProcedure):
MESSAGE
"File name:" hRunningProcedure:FILE-NAME
SKIP
"Persistent:" hRunningProcedure:PERSISTENT
VIEW-AS ALERT-BOX.

/* IF hRunningProcedure:FILE-NAME = cProcedureToDelete /*this IF clause is not entirely generic, beware of relative paths*/*/
/* THEN DELETE PROCEDURE hRunningProcedure. */

hRunningProcedure = hRunningProcedure:NEXT-SIBLING.
END.