InterSystems FAQ rubric
You can programmatically retrieve routine dates and sizes using the RoutineList query of the %Library.Routine (or just %Routine) class.
The RoutineList query has an argument, and the routine name to be searched can be specified by prefix match or middle match. (For wildcards, specify * or ?)
In the example below, *.MAC is specified as an argument.