I have this SET in ECL
EXPORT TableNames := [
'tbl1',
'tbl2',
'tbl3',
'tbl4'
];
APPLY(TableNames, SomeFunctionPreviouslydefined);
... and I want to pass it to a function using APPLY. APPLY does not accept SETs:
"3002: syntax error near \"tblList\" : expected RANGE, ROWSET, SELF, SUCCESS, datarow, dataset, dictionary, module-name, identifier, identifier, function-name, identifier, macro-name, '+', '^', '(', '['"
How can I do it?
Although it's not very clear in the documentation (https://hpccsystems.com/training/documentation/all - ECL Language Reference), you can use the DATASET declaration to convert a SET to a DATASET, specifically the form:
So, for your example, you can use:
Finally, to use that in your APPLY: