Issues while using Array and Arraylist as output parameters
GeethanjaliCP opened this issue · 2 comments
Problem accessing Array and Array list as output parameter - Traditional bridge
-
Using Arrays as INOUT/OUTPUT param:
-> Output parameter : if we initialize an output param with [10]D2 or [45]D2 it is considering only as [1]D2 and the output response is only one element. Expected output should be like this [45]D2 or [10]D2.
-> INOUT param is always giving NULL as response in JSON. -
ArrayList : Please find below structure set up,
Structure field_status,
Field_name ,[45]a19
Field_disable ,[45]d1
endstructure
Output parameter -> output parameter is declared as Arraylist in both program and in MDU
o_show_fields
,@Arraylist (inside MDU -> data type - Alpha and size - 20.)
local variable declared inside record and assigned structure ->
record
loc_fld ,field_status
Populating the structure using the for loop and assigning the value to output parameter as below:
for ctr from 0 thru 45
begin
loc_fld.Field_name[ctr]=show_fld[ctr+1]
loc_fld.Field_disable[ctr]=show_fld[ctr+1]
o_show_fields.Add((@field_status)loc_fld)
end
Using .ADD functionality is throwing below error:
Severity Code Description Project File Line Suppression State
%DBL-E-INVEXPR, Invalid expression at or near {1}
%DBL-I-EXPAN, Within expansion: Add
%DBL-I-YIELD, Resulting in: 1 : o_show_fields.Add((@field_status)loc_fld) WPLIB C:\WP210AAlistccstruct\AISELB\wp210a.dbl 208
That looks like a compiler error that might be telling you that you defined the token 'add' and the preprocessor has replaced the token add with what looks like a numeric literal 1. Keep in mind that dbl is generally case insensitive with identifiers. So when you are searching for this .define
, add
Add
and aDD
are the same as far as the preprocessor is concerned.