Hi, I'm Ask INFA!
What would you like to know?
ASK INFAPreview
Please to access Ask INFA.

Table of Contents

Search

  1. Preface
  2. Working with Transformations
  3. Address Validator Transformation
  4. Aggregator Transformation
  5. Association Transformation
  6. Bad Record Exception Transformation
  7. Case Converter Transformation
  8. Classifier Transformation
  9. Cleanse transformation
  10. Comparison Transformation
  11. Custom Transformation
  12. Custom Transformation Functions
  13. Consolidation Transformation
  14. Data Masking Transformation
  15. Data Masking Examples
  16. Decision Transformation
  17. Duplicate Record Exception Transformation
  18. Dynamic Lookup Cache
  19. Expression Transformation
  20. External Procedure Transformation
  21. Filter Transformation
  22. HTTP Transformation
  23. Identity Resolution Transformation
  24. Java Transformation
  25. Java Transformation API Reference
  26. Java Expressions
  27. Java Transformation Example
  28. Joiner Transformation
  29. Key Generator Transformation
  30. Labeler Transformation
  31. Lookup Transformation
  32. Lookup Caches
  33. Match Transformation
  34. Match Transformations in Field Analysis
  35. Match Transformations in Identity Analysis
  36. Merge Transformation
  37. Normalizer Transformation
  38. Parser Transformation
  39. Rank Transformation
  40. Router Transformation
  41. Sequence Generator Transformation
  42. Sorter Transformation
  43. Source Qualifier Transformation
  44. SQL Transformation
  45. Using the SQL Transformation in a Mapping
  46. Stored Procedure Transformation
  47. Standardizer Transformation
  48. Transaction Control Transformation
  49. Union Transformation
  50. Unstructured Data Transformation
  51. Update Strategy Transformation
  52. Weighted Average Transformation
  53. XML Transformations

Transformation Guide

Transformation Guide

Signature

Signature

A parameter passed to an external procedure is a pointer to an object of the TINFParam class. This fixed-signature function is a method of that class and returns the parameter datatype as an enum value.
The valid datatypes are:
  • INF_DATATYPE_LONG
  • INF_DATATYPE_STRING
  • INF_DATATYPE_DOUBLE
  • INF_DATATYPE_RAW
  • INF_DATATYPE_TIME
The following table describes some parameter access functions:
Parameter Access Function
Description
INF_DATATYPE GetDataType(void);
Gets the datatype of a parameter. Use the parameter datatype to determine which datatype-specific function to use when accessing parameter values.
INF_BOOLEAN IsValid(void);
Verifies that input data is valid. Returns FALSE if the parameter contains truncated data for the string or raw datatypes. Also returns FALSE when the input data exceeds the precision or the input data is a null value.
INF_BOOLEAN IsNULL(void);
Verifies that input data is NULL.
INF_BOOLEAN IsInputMapped (void);
Verifies that input port passing data to this parameter is connected to a transformation.
INF_BOOLEAN IsOutput Mapped (void);
Verifies that output port receiving data from this parameter is connected to a transformation.
INF_BOOLEAN IsInput(void);
Verifies that parameter corresponds to an input port.
INF_BOOLEAN IsOutput(void);
Verifies that parameter corresponds to an output port.
INF_BOOLEAN GetName(void);
Gets the name of the parameter.
SQLIndicator GetIndicator(void);
Gets the value of a parameter indicator. The IsValid and ISNULL functions are special cases of this function. This function can also return INF_SQL_DATA_TRUNCATED.
void SetIndicator(SQLIndicator Indicator);
Sets an output parameter indicator, such as invalid or truncated.
long GetLong(void);
Gets the value of a parameter having a Long or Integer datatype. Call this function only if you know the parameter datatype is Integer or Long. This function does not convert data to Long from another datatype.
double GetDouble(void);
Gets the value of a parameter having a Float or Double datatype. Call this function only if you know the parameter datatype is Float or Double. This function does not convert data to Double from another datatype.
char* GetString(void);
Gets the value of a parameter as a null-terminated string. Call this function only if you know the parameter datatype is String. This function does not convert data to String from another datatype.
The value in the pointer changes when the next row of data is read. If you want to store the value from a row for later use, explicitly copy this string into its own allocated buffer.
char* GetRaw(void);
Gets the value of a parameter as a non-null terminated byte array. Call this function only if you know the parameter datatype is Raw. This function does not convert data to Raw from another datatype.
unsigned long GetActualDataLen(void);
Gets the current length of the array returned by GetRaw.
TINFTime GetTime(void);
Gets the value of a parameter having a Date/Time datatype. Call this function only if you know the parameter datatype is Date/Time. This function does not convert data to Date/Time from another datatype.
void SetLong(long lVal);
Sets the value of an output parameter having a Long datatype.
void SetDouble(double dblVal);
Sets the value of an output parameter having a Double datatype.
void SetString(char* sVal);
Sets the value of an output parameter having a String datatype.
void SetRaw(char* rVal, size_t ActualDataLen);
Sets a non-null terminated byte array.
void SetTime(TINFTime timeVal);
Sets the value of an output parameter having a Date/Time datatype.
Only use the SetInt32 or GetInt32 function when you run the external procedure on a 64-bit Integration Service. Do not use any of the following functions:
  • GetLong
  • SetLong
  • GetpLong
  • GetpDouble
  • GetpTime
Pass the parameters using two parameter lists.
The following table lists the member variables of the external procedure base class:
Variable
Description
m_nInParamCount
Number of input parameters.
m_pInParamVector
Actual input parameter array.
m_nOutParamCount
Number of output parameters.
m_pOutParamVector
Actual output parameter array.
Ports defined as input/output show up in both parameter lists.

0 COMMENTS

We’d like to hear from you!