IBM Support

PI53511: <LANG>_CG::TYPE::DEFAULTVALUE PROPERTY IS MISSING IN RHAPSODYINC

A fix is available

Subscribe

You can track all active APARs for this component.

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



Document information

More support for: Rational Rhapsody

Software version: 8.1.3

Reference #: PI53511

Modified date: 25 April 2016