To access M routines from external (non-M) routines you must:
Code the M routine and the calling program.
Create a MACRO file containing one or more MUMPS_BINDING lines, as described in the next section. Either start the MACRO file with the following directive:
.library"gtm$dist:gtmzcall.mlb"
or add the following to the MACRO command:
+GTM$DIST:GTMZCALL.MLB/LIBRARY
Compile the programs and assemble the MACRO file.
Link all the resultant object files into a single image.
Examples of an external routine, an M routine, and a MACRO file appear later in this chapter.