Basically there are some includes used.
I'm not sure if any are documented, but for reporting I use the following.
{mfdtitle.i "q1a"} for the header of the report, sometimes {mfdeclre.i} to declare the global variables; the d in mfdtitle stands for declare, so this one is included in de mfdtitle.
mfselprt.i is the printer select; mfselbat is batch-output; mfselbpr is batch/printer output.
At the end of a report mftrail.i is used to print the trailer of the report (=selection), mfreset.i resets all variables/printer etc. and mfrtrail is the combination where the r stands for the calling of the mfreset.i.
Is this the kind of information you're looking for?
I have some hardcopy of the programming logic in MFG, I can make them electronic and sent them to you if you're interested.