Troubleshooting
Problem
When using IDL-generated C# code to call a Natural method with a 1:v variable length array, with the buffer pre-populated with 10 elements, some values of the response object are not populated (i.e. they are empty strings). On inspecting the output from the Natural method, the values are present. On inspecting the network traffic, the expected value is somewhere else in the buffer. Compared to the same IDL-generated C# code where 1:v is changed to 1:10, the values are populated as expected.
The Original IDL snippet that produces the unexpected results:
3 ptrList (/1:v)
Modified IDL that produces normal results:
3 ptrList (/1:10)
System:
• EntireX mini-runtime version: 9.7.0.0
• Consumer: .NET 4.5
• EntireX mainframe - version 9.7.0.08
The C# code difference that is generated is constrained to this line for fixed:
[SendAs(IdlType.Group, Id = 1, Dim = 10f)]public PtrListItem[] PtrList = (PtrListItem[])Construction.GroupArray(typeof(PtrListItem), 10, 0, 0);
This line for variable:
[SendAs(IdlType.Group, Id = 1, Dim = 0f, Unbounded = true, Dimensions = 1)]public PtrListItem[] PtrList = (PtrListItem[])Construction.GroupArray(typeof(PtrListItem), 1, 0, 0);
And they are called through a method that looks like:
[Program("ABC123N1")]
public void Abc123n1([SendAs(IdlType.Group)][In, Out] ref Abc123n1.Abc123 abc123) {
service.Send(this.GetType().GetMethod("Abc123n1"), abc123);
}
This is all auto-generated by the EntireX visual studio plugin.
Document Location
Worldwide
Log InLog in to view more of this document
Was this topic helpful?
Document Information
Modified date:
20 March 2025
UID
ibm17217042