Using and defining macros

As in many programmable software products, defining a macro allows you to automate repetitive tasks. This can be very useful when you configure a GoldenGate process. For example, trapping an exception for each MAP statement in a Replicat parameter file is both necessary and repetitive. However, defining the macro at the start of the parameter file allows the code to be called by an alias, multiple times in the configuration.

The following code defines the #exception_handler() macro in a Replicat parameter file. All macros have a hash # character prefix in their name as follows:

-- This starts the macro MACRO #exception_handler BEGIN , TARGET ggs_admin.exceptions , COLMAP ( rep_name = "ROLAP01" , table_name = @GETENV ("GGHEADER", ...

Get Oracle GoldenGate 12c Implementer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.