15.00 - Defining Implementations for Methods - Parallel Transporter

Teradata Parallel Transporter Operator Programmer Guide

prodname
Parallel Transporter
vrm_release
15.00
category
Programming Reference
featnum
B035-2435-034K

Defining Implementations for Methods

Use the following model to define an implementation for a method:

PXSTC_Code PX_Method(PX_OperatorHandle operatorHandle, PX_LongInt phase)
{
  .
  return(PXSTC_EndMethod);
}

where PX_Method can be one of the following:

  • PX_Initiate
  • PX_Execute
  • PX_Checkpoint
  • PX_Restart
  • PX_Event
  • PX_Terminate
  • Example  

    The following example shows how to define methods for an access operator:

    /**** INITIATE method ****/
    PXSTC_Code
    PX_Initiate(PX_OperatorHandle operatorHandle, PX_LongInt phase)
    {
      .
      return(PXSTC_EndMethod);
    }
    /**** EXECUTE method ****/
    PXSTC_Code
    PX_Execute(PX_OperatorHandle operatorHandle, PX_LongInt phase)
    {
      .
      return(PXSTC_EndMethod);
    }
    /**** TERMINATE method ****/
    PXSTC_Code
    PX_Terminate(PX_OperatorHandle operatorHandle, PX_LongInt phase)
    {
      .
      return(PXSTC_EndMethod);
    }
     
    /**** CHECKPOINT method ****/
    PXSTC_Code
    PX_Checkpoint(PX_OperatorHandle operatorHandle, PX_LongInt phase)
    {
      .
      return(PXSTC_EndMethod);
    }
     
    /**** RESTART method ****/
    PXSTC_Code
    PX_Restart(PX_OperatorHandle operatorHandle, PX_LongInt phase)
    {
    .
    return(PXSTC_EndMethod);
    }
    /**** EVENT method ****/
    PXSTC_Code
    PX_Event(PX_OperatorHandle operatorHandle, PX_LongInt phase)
    {
    .
    return(PXSTC_EndMethod);
    } 
    }
    PX_DefineOperator(“MyOperatorName”, PX_MultiPhase);