Figure 5
Checking after an Insert statement

Select

  When   SqlState = SqlStateOK

         // Skip

  When   SqlState = SqlStateDupKey

    ExSr SqlDupKey

  When   %Subst( SqlState : 1 : 2 ) = SqlStateCstPfx

    ExSr SqlCstErr

  When   %Subst( SqlState : 1 : 2 ) = SqlStateWrnPfx

    ExSr SqlWarning

  Other

    ExSr SqlError

EndSl