There seems to be a problem with occurrence ds's in cw/new toolkit.
Most of our RPG programs we use from PHP have multiple occurrence data structures as (*ENTRY) input (and output) values.
The old toolkit worked with these fine, in example we have some RPG program that has occurs 10 ds and when we make the program call the actual input value arrays can happily range anywhere from 0 to 10.
With the new toolkit (cw mode) when the call comes with say 2 arrays in ds, the rest 8 are left null, which is the problem.
The RPG program promptly crashes when there's a nulls in ds, the old toolkit didn't send null's in empty ds arrays but *BLANKS and *ZEROS and everything was peachy.
Now there's a way to fix this in cw, in cwclasses.php in method oldToNewDescriptionItem there already is option to add empty default values but apparently this is only applied if the whole ds is empty (output only).
What should be done is apply default values to all arrays up to count (occurrence amount described not count of real values) and then overwrite the values needed with real values coming in $inputValues.
Or apply the real values to call parameters and fill the rest of the occurrences (up to described amount) with empty values.
Ofcourse if there's a way to get the new toolkit to send *BLANKS and *ZEROS instead of NULLS with RPG-call, without initializing whole ds with empty values, it would be better solution.
Also there seems to be some problem (or discrepancy with old toolkit) with the way multiple occurrence ds's are returned from program call.
Our old programs don't work the way the used to in this regard either.
I'll get more on this when I have more relevant information available.
-Timo

