Generated C# Stub using alias for program name

We are new to using EntireX and have EntireX workbench V7.1.1.30. I have a problem with the generated C# stub.
My .idl looks as follows:
library ‘MYLIB’ is
program ‘SUBPGM1’:‘GetInfo’ is
define data parameter
1 Input In
2 StartDate (N8)
1 OutputArray (/10) Out
2 LastName (A20)
2 FirstName (A15)

The C# Group is generated as follows:
#region Groups for LIBRARY ‘MYLIB’, PROGRAM ‘SUBPGM1’
public class GetInfo
public class Input
[SendAs(IdlType.N, preDecimal=8, postDecimal=0)]public decimal startdate;
public class Outputarray
[SendAs(IdlType.A, Length=20f)]public StringBuilder lastname;
[SendAs(IdlType.A, Length=15f)]public StringBuilder firstname;

and the Method is generated as follows:
#region Method/Function for LIBRARY ‘MYLIB’ PROGRAM ‘SUBPGM1’
public void GetInfo(
[SendAs(IdlType.Group)][In] Groups.GetInfo.Input input,
[SendAs(IdlType.Group, Dim=10f)][Out] out Groups.GetInfo.Outputarray outputarray
outputarray = (Groups.Subpgm1.Outputarray)Construction.GroupArray(typeof(Groups.Subpgm1.Outputarray), 10, 0, 0);

The problem is the line
outputarray = (Groups.Subpgm1.Outputarray)Construction.GroupArray(typeof(Groups.Subpgm1.Outputarray), 10, 0, 0);
it should be GetInfo instead of Subpgm1 in the above line.

If I do not use an alias for my program name, then I do not have this problem. I also do not have a problem if I make the fields arrays instead of the groupname. I’m not a .NET expert but the people using the C# stubs says that making the groupname an array (i.e. arrays of objects) is preferable to making the fields arrays (i.e. arrays of fields inside an object).

Is this a known problem with this version of the workbench or am I doing something wrong.


This looks like a problem with the .Net wrapper. Please open a support request with Servline24 to report it.

In the meantime, you can work around the problem by changing your IDL slightly:

program ‘SUBPGM1’:‘GetInfo’ is
define data parameter
1 Input In
2 StartDate (N8)
1 outParm out
2 OutputArray (/10) Out
3 LastName (A20)
3 FirstName (A15)

You do not have to change the Natural subprogram for this to work.

Douglas Kelly,
Principal Consultant
Software AG, Inc

Douglas is right, this is actually a problem in the .NET Wrapper. Will be solved soon in a hot fix. So please contact support.

Kind regards,