A fix is available
APAR status
Closed as program error.
Error description
Environment: Windows Product name: IBM? Rational? Business Developer Program Version : 8.0.1.2 Description. Generated Java code from syntactically correct EGL source includes an error indicator specified as: 'The method setValue(BigInteger) in the type BigNumericValue is not applicable for the arguments (short)' Sample EGL code: * xsN20TimestampOfIso converts a timestamp from ISO to N20 format, i.e. from 'yyyy-MM-dd-HH.mm.ss.uuuuuu' to yyyyMMddHHmmssuuuuuu. */ function xsN20TimestampOfIso(inputTimestamp char(26) in) returns(num(20)) returnTimestamp num(20); tmp string; i int; x num(20); if (strLib.characterLen(inputTimestamp) == 26) // yyyy-MM-dd-HH.mm.ss.uuuuuu tmp = inputTimestamp[1 : 4] + inputTimestamp[6 : 7] + inputTimestamp[9 : 10] + inputTimestamp[12 : 13] + inputTimestamp[15 : 16] + inputTimestamp[18 : 19] + inputTimestamp[21 : 26]; else if (strLib.characterLen(inputTimestamp) == 19) // yyyy-MM-dd-HH.mm.ss tmp = inputTimestamp[1 : 4] + inputTimestamp[6 : 7] + inputTimestamp[9 : 10] + inputTimestamp[12 : 13] + inputTimestamp[15 : 16] + inputTimestamp[18 : 19] + '000000'; else if (strLib.characterLen(inputTimestamp) == 10) // yyyy-MM-dd tmp = inputTimestamp[1 : 4] + inputTimestamp[6 : 7] + inputTimestamp[9 : 10] + '000000000000'; else if (inputTimestamp == '' or inputTimestamp == '0') tmp = '00000000000000000000'; else // Invalid format throw new AnyException {message = 'Invalid input in sTimestampOfText: Input=' + inputTimestamp}; end end end end // NVH defect 2856 if (tmp == '00010101000000000000') // Invalid format will return NULL timestamp return(00000000000000000000); else x = 0; for(i from 1 to 20) x = x*10 + tmp[i:i]; end return(x); end end The generated Java code will then produce this error in problems view referring to the statement, $result.setValue( x.getValue( ezeProgram ) ); from the following code segment: // x = x * 10 + tmp[i:i]; com.ibm.javart.operations.Assign.run( ezeProgram, x, com.ibm.javart.operations.Add.run( ezeProgram, com.ibm.javart.operations.Multiply.run(ezeProgram, x, (short)10 ), com.ibm.javart.operations.Substring.run( ezeProgram, tmp, i, i ) ) ); } // RETURN x if ( true ) { // $result = x; //error indicator for the line below // The method setValue(BigInteger) in the type BigNumericValue is not applicable for the arguments (short) $result.setValue( x.getValue( ezeProgram ) ); _funcPop(); return $result; } } // RETURN NUM(20,0) _funcPop(); return $result; }
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: * **************************************************************** * PROBLEM DESCRIPTION: * **************************************************************** * RECOMMENDATION: * **************************************************************** Generated Java code has a compile error when the following are true: A. The source of an assignment is an integer literal with more than 18 digits and some leading zeros. B. The target of the assignment is a num, numc, pacf, decimal, or money variable. C. The target of the assignment has no decimals, and its length is ?= the length of the literal. The problem also happens with return statements, where the returned value is the literal, and the "target" is the return type of the function. Examples: n num(22,0) = 0000000000000000001; function x() returns( decimal(20) ) return( 0000000000000000001 ); end
Problem conclusion
Java generation has been updated to create correct Java output.
Temporary fix
Comments
APAR Information
APAR number
PM51584
Reported component name
RATL BUS DEV
Reported component ID
5724S5000
Reported release
801
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2011-11-04
Closed date
2012-01-27
Last modified date
2012-01-27
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
RATL BUS DEV
Fixed component ID
5724S5000
Applicable component levels
R801 PSN
UP
[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSMQ79","label":"Rational Business Developer"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.0.1","Edition":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]
Document Information
Modified date:
27 January 2012