Example
Update the value of variable V_EMP_NUM to the value of EMPLOYEE_ID while using mapping to set the value of V_EMPLOYEE_LNAME to EMPLOYEE_LNAME.
-- Declare a 5 byte variable VAR_NUM and initialize it to zero (0)
DECLARE V_EMP_NUM 5 ‘0’;
-- Declare a 20 byte variable V_EMPLOYEE_LNAME and initialize it to spaces
DECLARE _EMPLOYEE_LNAME 20 ‘ ‘;
PROCESS INTO TARGET_DS
SELECT
{
V_EMP_NUM = EMPLOYEE_ID
V_EMPLOYEE_LNAME = EMPLOYEE_LNAME
}
FROM SOURCE_DS;