A fix is available
APAR status
Closed as program error.
Error description
RhapsodyInC++ has a property to define the default value for a user-defined type. This was not added to RhapsodyInC for an unknown reason. This results in a user-defined return type that cannot be initialized, which in turn leads to unsafe code. STEPS TO REPRODUCE: 1. Create RhapsodyInC project 2. Add an enumeration with some literals. 3. Add an interface with a single operation, set the return type to the above enumeration. 4. Generate the code and see the .c file for the interface's operation. The auto-gen code for handling the virtual lookup table doesn't initialize the return type. This is because Rhapsody cannot know how to intialize a user-defined type. But this is also why the <Lang>_CG::Type::DefaultValue property is required in RhapsodyInC. WORKAROUND: Use postprocessor scripting to modify code after generation. see CG::File::InvokePostProcessor property. http://www-01.ibm.com/support/knowledgecenter/SSB2MU_8.1.3/com.s odius.mdw.ria.doc/doc/RiA_CG_User_Guide/Properties.html?lang=en
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: * * Rhapsody 8.1.3 * **************************************************************** * PROBLEM DESCRIPTION: * * <Lang>_CG::Type::DefaultValue property is missing in * * RhapsodyInC so intrface function code don't initialize the * * return value on declaration * **************************************************************** * RECOMMENDATION: * ****************************************************************
Problem conclusion
Fixed in 8.1.5 problem fixed, by add the same behaviour as in C++ two new proprties: - C_CG::Type::DefaultValue - C_CG::Class::DefaultValue give default value same as in C++ code note: the properties are look on from the function with the return type
Temporary fix
Comments
APAR Information
APAR number
PI53511
Reported component name
TLOGIC RHAPSODY
Reported component ID
5724V74RP
Reported release
813
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2015-12-03
Closed date
2016-04-25
Last modified date
2016-04-25
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
TLOGIC RHAPSODY
Fixed component ID
5724V74RP
Applicable component levels
R813 PSY
UP
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SS7P9W","label":"Rational Rhapsody"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.1.3","Line of Business":{"code":"LOB02","label":"AI Applications"}}]
Document Information
Modified date:
14 October 2021