EXCELLENT! That is exactly what I needed. 

Also, you correctly observed that $DATA(pGlobalName) was only evaluating the local parameter and not its value. My return value is now 10. 

Thank you Robert. 

Thank you for your reply. 

I had to add EnsHL7 to the list of includes. It is interesting that this compiled previously without the reference. 

In my case, we already have standard purge tasks but were still left with orphaned messages. I seem to recall InterSystems support telling me that the standard purge tasks work from the header. 

Daniel has no followers yet.
Daniel has not followed anybody yet.
Global Masters badges:
Daniel has no Global Masters badges yet.