APAR status
Closed as program error.
Error description
The ESQL function POSITION in ICU mode behaves incorrectly when using a negative REPEAT argument. The following examples return incorrect values in ICU mode: POSITION('B' IN 'ABCABCABCABCABC' REPEAT -1) /* Expected: 14. Returned: 0. */ POSITION('CA' IN 'ABCABCABCABCABC' REPEAT -1) /* Expected: 12. Returned: 0. */ POSITION('BC' IN 'ABCABCABCABCABC' REPEAT -3) /* Expected: 8. Returned: 14. */ POSITION('A' IN 'ABCABCABCABCABC' REPEAT -2) /* Expected: 10. Returned: 0. */ POSITION('B' IN 'ABCABCABCABCABC' FROM 10 REPEAT -1) /* Expected: 8. Returned: 14. */ POSITION('BC' IN 'ABCABCABCABCABC' FROM 10 REPEAT -3) /* Expected: 2. Returned: 14. */ These examples all function correctly when ICU mode is disabled. Additionally, the Knowledge Center article for the POSITION function incorrectly displays the following example: POSITION('BC' IN 'ABCABCABCABCABC' FROM 2 REPEAT -3); -> return 5 which should instead read: POSITION('BC' IN 'ABCABCABCABCABC' FROM 12 REPEAT -3); -> returns 5 Finally, the Knowledge Center article for the POSITION function needs to be clearer that if a negative REPEAT is specified then the string is searched backwards from FROM (which defaults to the end of the string) to the start of the string for matches.
Local fix
n/a
Problem summary
**************************************************************** USERS AFFECTED: All users of IBM Integration Bus v10 and App Connect Enterprise v11 who use ESQL code in ICU mode. Platforms affected: MultiPlatform **************************************************************** PROBLEM DESCRIPTION: The ESQL function POSITION would return incorrect results whenever a negative REPEAT attribute is specified and the useICUStringManipulation attribute is set to 'yes' on the ImbESQLManager, for example: POSITION('B' IN 'ABCABCABCABCABC' REPEAT -1) /* Expected: 14. Returned: 0. */ POSITION('CA' IN 'ABCABCABCABCABC' REPEAT -1) /* Expected: 12. Returned: 0. */ POSITION('BC' IN 'ABCABCABCABCABC' REPEAT -3) /* Expected: 8. Returned: 14. */ POSITION('A' IN 'ABCABCABCABCABC' REPEAT -2) /* Expected: 10. Returned: 0. */ POSITION('B' IN 'ABCABCABCABCABC' FROM 10 REPEAT -1) /* Expected: 8. Returned: 14. */ POSITION('BC' IN 'ABCABCABCABCABC' FROM 10 REPEAT -3) /* Expected: 2. Returned: 14. */ These examples all return their expected values correctly when useICUStringManipulation is set to its default value of 'no'.
Problem conclusion
The product now returns correct and consistent results for the POSITION function whether or not ICU mode is enabled. --------------------------------------------------------------- The fix is targeted for delivery in the following PTFs: Version Maintenance Level v10.0 10.0.0.18 v11.0 11.0.0.6 The latest available maintenance can be obtained from: http://www-01.ibm.com/support/docview.wss?rs=849&uid=swg27006041 If the maintenance level is not yet available,information on its planned availability can be found on: http://www-1.ibm.com/support/docview.wss?rs=849&uid=swg27006308 ---------------------------------------------------------------
Temporary fix
Comments
APAR Information
APAR number
IT29349
Reported component name
INTEGRATION BUS
Reported component ID
5724J0540
Reported release
A00
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2019-06-11
Closed date
2019-09-30
Last modified date
2019-10-01
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
INTEGRATION BUS
Fixed component ID
5724J0540
Applicable component levels
[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSNQK6","label":"IBM Integration Bus"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"10.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]
Document Information
Modified date:
01 October 2019