PowerCenter
- PowerCenter 10.5.1
- All Products
JExpression addressLookup() throws SDKException { JExprParamMetadata params[] = new JExprParamMetadata[2]; params[0] = new JExprParamMetadata ( EDataType.STRING, // data type 50, // precision 0 // scale ); params[1] = new JExprParamMetadata ( EDataType.STRING, // data type 50, // precision 0 // scale ); return defineJExpression(":LKP.LKP_addresslookup(X1,X2)",params); } JExpression lookup = null; boolean isJExprObjCreated = false;
... if(!iisJExprObjCreated) { lookup = addressLookup(); isJExprObjCreated = true; } lookup = addressLookup(); lookup.invoke(new Object [] {NAME,COMPANY}, ERowType.INSERT); EDataType addressDataType = lookup.getResultDataType(); if(addressDataType == EDataType.STRING) { ADDRESS = (lookup.getStringBuffer()).toString(); } else { logError("Expression result datatype is incorrect."); } ...