Klappt inzwischen ganz gut mit SQL:
https://www.ibm.com/docs/en/i/7.5?to...table-function