APAR status
Closed as program error.
Error description
Environment: windows XP Rational Business Developer 7.5.1.6 Description: When using the indexOf functionality, it shows an error when using a char array Example: // Variable Declarations myChar10 char(10); x int; y int; z int; function main() x = indexOf(myChar10[1:z],'A'); y = indexOf(upperCase(myChar10),'A'); The error in the problems view shows as: The system function indexOf cannot accept an expression as an argument. Only items and literals are allowed. and The argument myChar10[1:z] cannot be passed to the loose parameter source of the function indexOf. It must be of primitive type string.
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: * **************************************************************** * PROBLEM DESCRIPTION: * **************************************************************** * RECOMMENDATION: * **************************************************************** The code was giving an error on these 2 uses of Indexof: x = indexOf(myChar10[1:z],"A"); y = indexOf(upperCase(myChar10),"A"); The second statement is a valid error, because we do not allow function invocation expressions on this function. However, the error on the first statement was invalid. The resolution was simply resolving to the wrong version of this function.
Problem conclusion
I have changed the resolution rules so that using the substring expression as an argument will resolve to the correct function. However, it is still invalid to use a function invocation as the first argument to IndexOf.
Temporary fix
Comments
APAR Information
APAR number
PM27352
Reported component name
RBD EGL FOR COB
Reported component ID
5724S5001
Reported release
751
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2010-11-23
Closed date
2011-05-06
Last modified date
2011-05-06
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
RBD EGL FOR COB
Fixed component ID
5724S5001
Applicable component levels
R751 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":"7.5.1","Edition":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]
Document Information
Modified date:
06 May 2011