Topic
  • 3 replies
  • Latest Post - ‏2013-09-17T17:41:50Z by markevans
dwkey
dwkey
203 Posts

Pinned topic The EGL mapping data type to C++ long int

‏2013-09-12T03:41:12Z |

 

When  verifying the VAGen-migrated EGL application,  customer has identified one different result between VG and EGL.

VG passed a Bin data type to C++ Long int for numeric operation.   RBD 9.0  migrated the VG bin data type to EGL Int

data type.   The returned value from C++  is now an totally unpredictable  value.   After testing for two more  EGL data types

(BigInt, Bin ) ,  the error remains.  

Please  help   

 

  • markevans
    markevans
    3034 Posts
    ACCEPTED ANSWER

    Re: The EGL mapping data type to C++ long int

    ‏2013-09-13T13:55:33Z  

    L.H.,

    For mapping of EGL datatypes to "C", see the following link in the EGL helps..  I would assume it applies to C++ as well.


    EGL Data Type Mappings to C

     

    So based on this, I would think BigInt would be best...but if the code was migrated over as INT, then that seemed to work in VAGen.

    I am thinking the problem may be a conversion issue with BIN fields depending on what changed on the caller.  ASCII on some systems requires the bin files to be in reverse mode (big Indian vs little Indian).  

    Do you have a conversion table specified on the calllink element used when calling the program.  

    I believe the right values going from Java to C++ would be:

                                                        AIX Server                  Windows Server                  z/OS, VSE, AS400 server (EBCDIC)    
    Chinese, simplified                CSOX1381                CSOI1381                             CSOE935
    Chinese, traditional                CSOX950                  CSOI950                                CSOE937

    This doc was taken from the VAGen Java related conversion info, so there may be a more recent code page (the number part) that needs to be used.

    Take a look at this.

    Mark

  • markevans
    markevans
    3034 Posts

    Re: The EGL mapping data type to C++ long int

    ‏2013-09-13T13:55:33Z  

    L.H.,

    For mapping of EGL datatypes to "C", see the following link in the EGL helps..  I would assume it applies to C++ as well.


    EGL Data Type Mappings to C

     

    So based on this, I would think BigInt would be best...but if the code was migrated over as INT, then that seemed to work in VAGen.

    I am thinking the problem may be a conversion issue with BIN fields depending on what changed on the caller.  ASCII on some systems requires the bin files to be in reverse mode (big Indian vs little Indian).  

    Do you have a conversion table specified on the calllink element used when calling the program.  

    I believe the right values going from Java to C++ would be:

                                                        AIX Server                  Windows Server                  z/OS, VSE, AS400 server (EBCDIC)    
    Chinese, simplified                CSOX1381                CSOI1381                             CSOE935
    Chinese, traditional                CSOX950                  CSOI950                                CSOE937

    This doc was taken from the VAGen Java related conversion info, so there may be a more recent code page (the number part) that needs to be used.

    Take a look at this.

    Mark

  • dwkey
    dwkey
    203 Posts

    Re: The EGL mapping data type to C++ long int

    ‏2013-09-17T02:48:42Z  
    • markevans
    • ‏2013-09-13T13:55:33Z

    L.H.,

    For mapping of EGL datatypes to "C", see the following link in the EGL helps..  I would assume it applies to C++ as well.


    EGL Data Type Mappings to C

     

    So based on this, I would think BigInt would be best...but if the code was migrated over as INT, then that seemed to work in VAGen.

    I am thinking the problem may be a conversion issue with BIN fields depending on what changed on the caller.  ASCII on some systems requires the bin files to be in reverse mode (big Indian vs little Indian).  

    Do you have a conversion table specified on the calllink element used when calling the program.  

    I believe the right values going from Java to C++ would be:

                                                        AIX Server                  Windows Server                  z/OS, VSE, AS400 server (EBCDIC)    
    Chinese, simplified                CSOX1381                CSOI1381                             CSOE935
    Chinese, traditional                CSOX950                  CSOI950                                CSOE937

    This doc was taken from the VAGen Java related conversion info, so there may be a more recent code page (the number part) that needs to be used.

    Take a look at this.

    Mark

    Mark,

    After changing the conversion table from CSOJ960 to CSOI950,  the problem was solved  for both EGL Bin and Int data type.

    For BigInt EGL data type ,   the value 9999 passed by EGL to C is correct.   

    the value  -9971 passed back to EGL will be converted to 4294957325. 

    Customer  will use the Int type as suggested by VG-EGL migration function,  so the question is answered.    Many thanks !

     

  • markevans
    markevans
    3034 Posts

    Re: The EGL mapping data type to C++ long int

    ‏2013-09-17T17:41:50Z  
    • dwkey
    • ‏2013-09-17T02:48:42Z

    Mark,

    After changing the conversion table from CSOJ960 to CSOI950,  the problem was solved  for both EGL Bin and Int data type.

    For BigInt EGL data type ,   the value 9999 passed by EGL to C is correct.   

    the value  -9971 passed back to EGL will be converted to 4294957325. 

    Customer  will use the Int type as suggested by VG-EGL migration function,  so the question is answered.    Many thanks !

     

    Glad it works for you now.