Source Macro File Processing [ VIRTUOSO CODE GENERATOR Reference Manual ] MPE/iX 5.0 Documentation
VIRTUOSO CODE GENERATOR Reference Manual
Source Macro File Processing
The Source Macro File contains the Virtuoso source for macros. There can
be many individual macros in a single Source Macro File. The Source
Macro File must be processed into a run-time format using the generator
in macro processor mode. The resulting Processed Macro File is a binary
file and cannot be edited. The generator then accesses the Processed
Macro File when it encounters a call to the macro.
A special parameter is included in the INFO string to process a Source
Macro File. This parameter tells the Virtuoso Code Generator that it is
processing a Source Macro File, and it is used only when processing
macros. The parameter is macroproc=on or mp=on. All other parameters
work the same for macros as they do for regular Virtuoso source files.
To process a Source Macro File, the generator is run as follows:
:FILE GENTEXT=MACSRC.TEST.ORDMGT
:FILE GENOUT=MACX0000.TEST.ORDMGT
:RUN VIRTUOSO.PUB.SYS;PARM=5;INFO="MACROPROC=ON"
The following formal file designators are recognized by the generator for
processing the Source Macro File:
Table 5-3. Formal File Designators for Source Macro Files
----------------------------------------------------------------------------------------------
| | | |
| Formal Designator | File Type | Default File |
| | | |
----------------------------------------------------------------------------------------------
| | | |
| GENTEXT | Source File | $STDIN |
| GENOUT | Output File | GENOUT |
| GENLIST | Listing File | $STDLIST |
| GENINFO | INFO String Parameters | none (optional) |
| | | |
----------------------------------------------------------------------------------------------
You can override the default source, output, and listing files using a
:FILE equation and specifying any desired formal file designators, then
specifying the corresponding PARM value in the :RUN command. This
informs the generator that you will not be using the default files.
The PARM values listed in Table 5-2 are used for processing the Source
Macro File. If the PARM value is not specified, then it defaults to 0
(none). In the following example the generator is run to process the
Source Macro File MACSRC:
:FILE GENLIST=MACLIST.TEST.ORDMGT
:FILE GENTEXT=MACSRC.TEST.ORDMGT
:FILE GENOUT=MACX0000.TEST.ORDMGT
:RUN VIRTUOSO.PUB.SYS;PARM=7;INFO="MP=ON"
The above example specifies the listing, source, and output files. The
value PARM=7 in the :RUN command indicates to the generator that the
listing, input, and output files have been specified in previous file
equations. Output is sent to the file MACX0000. MP=ON in the INFO
string tells the generator that it will be processing a Source Macro
File.
Later, when the binary file MACX0000 is to be used as the Processed Macro
File, it is equated to GENMACRO when the generator is run to generate
code from Virtuoso source which uses the macros in MACSRC.
MPE/iX 5.0 Documentation