I have some business requirement to modify the employee's name into various formats. I am trying to customise using LUA scripting. Below is my LUA script
function cm_starttable()
count = 0
tparm = 'PRO=HASH_LOOKUP,HASHFLD="SEQ",SRC="FIRST_NAME",'
tparm = tparm .. 'DEST="FIRST_NAME",REPLACE="FIRSTNAME",'
tparm = tparm .. 'CONN="DBCONN",USER=USER,PASS=PASSWORD,'
tparm = tparm .. 'lib=DB2ZOSSQL,'
tparm = tparm .. 'id="OPTIM.OPT_AU_FIRSTNAME_F",'
tparm = tparm .. 'FLDDEF1=(NAME="FIRST_NAME_SRCH",DT=CHAR,len=30)'
end
function cm_transform()
count = count+1
a=optim.source.getcolumnvalue("FIRST_NAME")
print("Processing column " .. source.column.getname())
print("Type: " .. source.column.gettype())
print(" Length: " .. source.column.getlength())
print("a: "..a)
print("tparm :" .. tparm)
fname= optim.mask(a,tparm)
optim.print("first name:" .. fname)
optim.target.setcolumnvalue("FIRST_NAME",fname)
end
function cm_endtable()
msg = count ..' rows matched the criteria'
print(msg)
end
however, I see below error when I execute the conversion.
CM PROCEDURE aborted with the following error:DB.PERSONAL_DATA(FIRST_NAME): Column: FIRST_NAME:Error in Column Map procedure or expression: while executingcm_transform(): 17: Lookup Provider failed to initialize. A (re)BINDof ODPP DBRM is required
Please let me know what is wrong with the code or installation.
------------------------------
Sampath Gelli
------------------------------
#InfoSphereOptim#Optim