Customizing Macros [ VIRTUOSO CODE GENERATOR Reference Manual ] MPE/iX 5.0 Documentation
VIRTUOSO CODE GENERATOR Reference Manual
Customizing Macros
If you plan to customize the macros or models, you must copy the source
file to a local group. All files in VIRTUOSO.SYS are read-only; you
cannot write to them. The following examples illustrate how macros from
the Virtuoso COBOL Sample Library can be customized.
EXAMPLE 1
All of the macros are to be used without modification, in this example,
with the exception of the DBOpen macro. The DBOpen macro is customized.
The following steps are followed:
1. The MAC03M00 (TurboIMAGE macros) Source Macro File is copied from
VIRTUOSO.SYS. The DBOpen macro is customized and the MAC03M00 file
is kept in the ORDMGT group.
2. A Source Macro File is created in the ORDMGT group to include the
customized MAC03M00.ORDMGT.VIRTUOSO file as well as the unmodified
macros.
This file contains #include statements which point to the Source
Macro Files to be processed.
#include file="MAC01M00.VIRTUOSO.SYS"
#include file="MAC02M00.VIRTUOSO.SYS"
#include file="MAC04M00.VIRTUOSO.SYS"
#include file="MAC05M00.VIRTUOSO.SYS"
#include file="MAC06M00.VIRTUOSO.SYS"
#include file="MAC03M00.ORDMGT.VIRTUOSO"
Note that the file, MAC03M00.VIRTUOSO.SYS is omitted from the
above list.
3. The generator is run to create the Processed Macro File in the
ORDMGT group.
EXAMPLE 2
In this example, a new group of macros is created to work with KSAM
files.
1. A new Source Macro File is created in the ORDMGT group. The
source code for the new macros is contained in this new file.
(This includes the macro header and macro body which is required
by the .) Each macro is bracketed with #macro and #endmacro
constructs. The macros are separated in the file by #comment
lines which document the usage of each macro. The file is kept as
KSAMMAC in the ORDMGT group.
2. A Source Macro File is created to include the new
KSAMMAC.ORDMGT.VIRTUOSO file.
This file contains #include statements which point to the Source
Macro Files to be processed.
#comment Description:
#comment This file INCLUDEs all of the
#comment Source Macro Files, the customized IMAGE
#comment File, and KSAM File to be processed.
#comment
#include file="MAC01M00.VIRTUOSO.SYS"
#include file="MAC02M00.VIRTUOSO.SYS"
#include file="MAC04M00.VIRTUOSO.SYS"
#include file="MAC05M00.VIRTUOSO.SYS"
#include file="MAC06M00.VIRTUOSO.SYS"
#include file="MAC03M00.ORDMGT.VIRTUOSO"
#include file="KSAMMAC.ORDMGT.VIRTUOSO"
In the above example, the #comment lines are optional. An
#include statement is added for each file which is to be processed
by the generator. The MAC03M00 file was copied and customized, as
shown in Example 1 on the preceding page. Note that the
customized MAC03M00 file is included along with the new KSAMMAC
file.
3. The generator is run to create the Processed Macro File in the
ORDMGT group.
MPE/iX 5.0 Documentation