IBM Support

RS03078: BAL SENTENCE 'IS ONE OF' IS NOT WORKING WITH BIGDECIMAL IN DE

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • the BAL rule:
    
    if 'big number' is one of { 4.0, 4.5 } then ...
    
    is not fired in DE if 'big number' is set to 'new
    BigDecimal("4")', while it is fired in CRE.
    

Local fix

  • You need to transform 4 into 4.0 before the evaluation. It can
    be done with b2x
    
    bom:
    public static final java.math.BigDecimal BigDecimal(double
    toconvert);
    b2x:
    java.lang.String str = java.lang.Double.toString(toconvert);
    return new java.math.BigDecimal( str );
    voc:
    tools.Tool.BigDecimal(double)#phrase.navigation = the
    bigDecimal {0}
    
    and the rule is written
    
    then
    set the WTNominal MM of Converter to the bigDecimal 4;
    
    or you can also write
    
    if
    the bigDecimal the WTNominal MM of Converter is one of {4.0 ,
    4.5}
    then
    print "WT ok";
    else
    print "WT Nok" ;
    

Problem summary

  • With the Decision Engine the BAL sentence 'is one of' is not
    working with BigDecimal.  For instance, the BAL rule:
    if 'big number' is one of { 4.0, 4.5 } then ...
    is not fired in DE if 'big number' is set to 'new
    BigDecimal("4")', while it is fired in CRE.
    

Problem conclusion

  • The code is fixed.
    

Temporary fix

  • You need to transform 4 into 4.0 before the evaluation. It can
    be done with bom to xom mapping.
    bom:
    public static final java.math.BigDecimal BigDecimal(double
    toconvert);
    bom to xom (b2x):
    java.lang.String str = java.lang.Double.toString(toconvert);
    return new java.math.BigDecimal( str );
    voc:
    tools.Tool.BigDecimal(double)#phrase.navigation = the
    bigDecimal {0}
    and the rule is written
    then
    set the WTNominal MM of Converter to the bigDecimal 4;
    or you can also write
    if
    the bigDecimal the WTNominal MM of Converter is one of {4.0 ,
    4.5}
    then
    print "WT ok";
    else
    print "WT Nok" ;
    

Comments

APAR Information

  • APAR number

    RS03078

  • Reported component name

    WS DECISION CTR

  • Reported component ID

    5725B6900

  • Reported release

    891

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2018-03-23

  • Closed date

    2018-03-23

  • Last modified date

    2018-03-23

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Modules/Macros

  • 999
    

Fix information

  • Fixed component name

    WS DECISION CTR

  • Fixed component ID

    5725B6900

Applicable component levels

  • R891 PSY

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SUPPORT","label":"IBM Worldwide Support"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"891","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
01 September 2021