DUPLICATE function

This function can be used to create the duplicate record of only those required processed record in a file with also having the updates in that record to be duplicated. This function has to be always used with SCRIPT function. In SCRIPT function this can be used only in Execution Block i.e. {…}

DUPLICATE functions can be used only in Field Transformation i.e. not in HEADER or FOOTER.

Example:

SCRIPT([ACCT_ID_1!=''],{DUPLICATE(ZACCT_ID_CUST=ZCASHACCT_ID_UPD,
ZACCTCHAR_CUST_0_UPD=ZCASHACCT_ID_UPD,ZACCTCHAR_CUST_1_UPD=ZCASHACCT_ID_UPD,
ZACCTCHAR_CUST_2_UPD=ZCASHACCT_ID_UPD,ZACCTCHAR_CUST_3_UPD=ZCASHACCT_ID_UPD);
‘123456789’})

SCRIPT workflow: IF the ACCT_​ID_​1 is not empty THEN execute DUPLICATE function and map the returned value. ELSE 123456789

Function:

TODO(TODO_TYPE,TODO_ROLE,ASSIGN_USER,STATUS,SINGLE_TODO,SORT_KEY[KEY_LIST],
DRILL_KEY[KEY_LIST],CHAR[TYPE=VALUE],MSG[MSG_CAT,MSG_NUM,parm1,param2..])

INPUT Parameter – This can have list of COMMA-SEPARATED KEY-VALUE pairs that is to be updated in duplicated record payload.

  • KEY – This is the XPATH of element in the record payload for which the value is to be updated. It can be the FIELD NAME configured in FIELD TRANSFORMATION whose corresponding XPATH will be referred or we can directly have the XPATH as a KEY.

  • VALUE – It can have the LITERAL values i.e. static values enclosed in single quotes or the CONSTANT values i.e. ”:BUS_​DATE, :BUS_​DTTM , :STD_​DATE, :STD_​DTTM, :SYSDATE, :SYS_​DTTM, :CHAR_​DATE, :FILENAME, :FILE_​ID“ or those configured FIELD names in FIELD TRANSFORMATION whose mapped value will be referred.