Written by

Question omer · Sep 29, 2024

Run a routine that was created and compiled with %Routine library

I created and then compiled a routine using the %Routine library 


s routine = ##class(%Routine).%New(fileName_"."_extension)
d routine.Write(parsedRule)
//s status = routine.Save()
s status = routine.SaveStream(,.refresh)
if ($$$ISERR(status)) throw status

Now the routine compiles successfully and as a result it is saved on the database.
I can now use from anywhere:


set r = ##class(%Routine).%New("myGeneratedCode.mac")

w r.SizeGet()

and it would output the size.
but for the question: How do i run a method in that file? It is saved on the database and i can't relaly see the path, what class can run this routines methods?

EDIT:
I can see the routine saved on ^rMAC("myRoutineName")
how can i run this MAC?

 

Product version: IRIS 2019.4

Comments

omer  Sep 29, 2024 to John Murray

Awesome, It works. thx!

0