Contents: | Main | Chapter | See Also: | Getting Started Manual | Advanced User Manual |
PRINT templates can be compiled into M routines just as INPUT templates can be. The purpose of this DIPZ code generation is simply to improve overall system throughput.
Only regular PRINT templates can be compiled. You cannot compile FILEGRAM, EXTRACT, Selected Fields for Export, or EXPORT templates that are also stored in the PRINT template file.
Call the ^DIPZ routine and specify the maximum routine size, the name of the PRINT template to be used, the name of the M routine to be created, and the margin width to be used for output (typically 80 or 132). If you specify the routine name XXX and if more code is generated than can fit into that one routine, overflow routines (XXX1, XXX2, etc.) will be created. Routine XXX may call XXX1, XXX2, etc.
Once DIPZ has been used to create a hard-coded output routine, that routine is usually invoked automatically by VA FileMan within the Print File Entries and Search File Entries options and when called at EN1^DIP whenever the corresponding PRINT template is used. The compiled routines are not used if a user-specified output margin width is less than the compiled margin. Also, if the template is used with ranked sorting (i.e., the ! sort qualifier is used), the compiled version is not used.
As with compiled INPUT templates, as soon as data dictionary definitions of fields used in the PRINT template are changed, the hard-core routine(s) is/(are) compiled immediately.
A DIPZ-compiled M routine may be called by any program that passes to it the variables DT, DUZ, IOSL (screen length), U (^), and D0 (the entry number to be displayed). Additionally, the variable DXS must be killed before calling the routine and after returning from it. The compiled routine writes out its report for that single entry. However, routines compiled from templates that include statistical totals cannot be called in this way.
Reviewed/Updated: March 8, 2007