Call a Macro without Input Parameters
To call a macro without input parameters, the call statement must supply the open and close parentheses, but without any input values: #macro ()
.
The following macro is defined without input parameters. The body contains frequently used parameters.
MACRO #option_defaults
BEGIN
GETINSERTS
GETUPDATES
GETDELETES
INSERTDELETES
END;
This macro is called as follows:
#option_defaults ()
IGNOREUPDATES
MAP owner.srctab, TARGET owner.targtab;
#option_defaults ()
MAP owner.srctab2, TARGET owner.targtab2;
The macro expands as follows:
GETINSERTS
GETUPDATES
GETDELETES
INSERTDELETES
IGNOREUPDATES
MAP owner.srctab, TARGET owner.targtab;
GETINSERTS
GETUPDATES
GETDELETES
INSERTDELETES
MAP owner.srctab2, TARGET owner.targtab2;