5 Replies Latest reply: Apr 6, 2012 2:47 AM by user13534672 RSS

    Invalid option for MAP: MAP.

    user13534672
      Hi ,

      My replication file is running fine with below contents

      MAP PROD.f0911, TARGET PROD.f0911, &
      REPERROR (21000, EXCEPTION), &
      SQLEXEC (ID lookup, ON UPDATE, &
      QUERY "select count(*) conflict from PROD.f0911 where ID_NO = :p1 and &
      UPDT_DT > :p2", &
      PARAMS ( p1 = ID_NO, p2 = UPDT_DT ), BEFOREFILTER, ERROR REPORT, &
      TRACE ALL),&
      FILTER (lookup.conflict = 0, ON UPDATE, RAISEERROR 21000);

      MAP PROD.f0911, TARGET PROD.f0911_EI, EXCEPTIONSONLY, &
      INSERTALLRECORDS, &
      COLMAP (USEDEFAULTS ,
      dberr = @GETENV ("lasterr", "dberrnum");


      REPERROR (-1403, EXCEPTION)
      MAP PROD.f0911, TARGET PROD.f0911_EI,
      EXCEPTIONSONLY,
      INSERTALLRECORDS,
      COLMAP (USEDEFAULTS,
      dberr = @GETENV ("lasterr", "dberrnum");

      But when I am adding

      MACRO #exception_handler
      BEGIN
      ,TARGET PROD.f0911
      ,UPDATEINSERTS
      ,EXCEPTIONSONLY
      END;

      REPERROR (-1, EXCEPTION)
      MAP PROD.f0911, TARGET PROD.f0911;
      MAP PROD.f0911 #exception_handler()

      It is throwing error ---- ERROR OGG-00212 Invalid option for MAP: MAP.

      Can somebody please help how can I proceed with all the conditions.

      Thanks