T_DTS asc num_found = row_count num_updated = 0 // Get extra information for each trade in the trade list. for (i = 0; i < num_found; i++) { // Get settlement information // Will return only one row for each trade select settlement_amount[i] = SE_AMT, settlement_cash_due_date[i] = SE_CASH_DUE_DATE, settlement_cash_type[i] = SE_CASH_TYPE from SETTLEMENT where SE_T_ID = trade_list[i] // get cash information if this is a cash transaction // Will return only one row for each trade that was a cash transaction if (is_cash[i]) then { if (num_updated < max_updates) then { // Modify the CASH_TRANSACTION row for this trade. select ct_name = CT_NAME from CASH_TRANSACTION where CT_T_ID = trade_list[i] if (ct_name like shares of %”) then “% ct_name = type_name[i] + + quantity[i] + Shares of + s_name[i] “ “ “ “ else ct_name = type_name[i] + + quantity[i] + shares of + s_name[i] “ “ “ “ update CASH_TRANSACTION set CT_NAME = ct_name CT_T_ID = trade_list[i] num_updated = num_updated + row_count
T_DTS asc num_found = row_count num_updated = 0 // Get extra information for each trade in the trade list. for (i = 0; i < num_found; i++) { // Get settlement information // Will return only one row for each trade select settlement_amount[i] = SE_AMT, settlement_cash_due_date[i] = SE_CASH_DUE_DATE, settlement_cash_type[i] = SE_CASH_TYPE from SETTLEMENT where SE_T_ID = trade_list[i] // get cash information if this is a cash transaction // Will return only one row for each trade that was a cash transaction if (is_cash[i]) then { if (num_updated < max_updates) then { // Modify the CASH_TRANSACTION row for this trade. select ct_name = CT_NAME from CASH_TRANSACTION where CT_T_ID = trade_list[i] if (ct_name like “% shares of %”) then ct_name = type_name[i] + “ “ + quantity[i] + “ Shares of “ + s_name[i] else ct_name = type_name[i] + “ “ + quantity[i] + “ shares of “ + s_name[i] update CASH_TRANSACTION set CT_NAME = ct_name CT_T_ID = trade_list[i] num_updated = num_updated + row_count
tpcx-v_v2.1.0.docx