# Generated C# Stub using alias for program name

**URL:** <https://techcommunity.softwareag.com/t/generated-c-stub-using-alias-for-program-name/58744>\
**Category:** Forum\
**Tags:** Mainframe-Integration, EntireX\
**Created:** [February 10, 2005, 7:10pm UTC](https://techcommunity.softwareag.com/t/generated-c-stub-using-alias-for-program-name/58744 "2005-02-10T19:10:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lizette](https://avatars.discourse-cdn.com/v4/letter/l/ecae2f/32.png) [@Lizette](https://techcommunity.softwareag.com/u/Lizette)\
**Post date:** [February 10, 2005, 7:10pm UTC](https://techcommunity.softwareag.com/t/generated-c-stub-using-alias-for-program-name/58744/1 "2005-02-10T19:10:56Z")

</div>

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)  
 end-define  
  
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’  
 [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);  
 service.Send(  
 this.GetType().GetMethod(“GetInfo”),  
 input,  
 outputarray  
 );  
 }  
  
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.  
  
Thanks

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [February 14, 2005, 4:34am UTC](https://techcommunity.softwareag.com/t/generated-c-stub-using-alias-for-program-name/58744/2 "2005-02-14T04:34:47Z")

</div>

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)  
end-define  
  
You do not have to change the Natural subprogram for this to work.  
  
Douglas Kelly,  
Principal Consultant  
Software AG, Inc

---

<div class="post-metadata">

**Author:** ![Rolf\_Bahlke](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/rolf_bahlke/32/109_2.png) [@Rolf\_Bahlke](https://techcommunity.softwareag.com/u/Rolf_Bahlke)\
**Post date:** [February 16, 2005, 2:56pm UTC](https://techcommunity.softwareag.com/t/generated-c-stub-using-alias-for-program-name/58744/3 "2005-02-16T14:56:00Z")

</div>

> [@](#):
>
> This looks like a problem with the .Net wrapper. Please open a support request with Servline24 to report it.

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,  
Rolf

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:39pm UTC](https://techcommunity.softwareag.com/t/generated-c-stub-using-alias-for-program-name/58744/4 "2021-04-02T14:39:26Z")

</div>


