I was trying to do a SQL Select into myExtDs but SQL does not like the data structure since I'm trying to define an array and put 12 dates for example into it. My solution was to make 2 data structures and move one into the the other. Is there a way to use a single data structure and make this work? Also it would be nice to be able to use an array on a where clause like where date = :startDatesArr(1); or on Insert/Update statements.
DCL-DS myExtDs ExtName('MYTABLE') QUALIFIED; startDatesArr DATE dim(12) pos(10); END-DS; DCL-DS myExtDs2 ExtName('MYTABLE') QUALIFIED; END-DS; Exec Sql Select * INTO :myExtDs2 from MYTABLE Fetch First Row Only; myExtDs = myExtDs2;