C$REGEXP Fails to Find Match

0 Likes

Problem:

A program which uses C$REGEXP to locate records, and works in version 9.1.2.1, fails to find a match after upgrading to version 9.2.5.

Solution:

In version 9.2 an enhancement was made to C$REGEXP in order to facilitate searching for multiple occurrences of a match.  The MATCH-START parameter is now both an input and output parameter.  Refer to the documentation here:

http://documentation.microfocus.com/help/topic/com.microfocus.eclipse.infocenter.extendACUSuite/BKPPPPLIBRS079.html?cp=5_0_1_4_8_0_46 

Prior to the change MATCH-START was only an output parameter and the program initialized it to 9999 which was fine then. The value returned from the routine indicated the starting position of the match.  With the new functionality the program passes 9999 to the C$REGEXP routine as the location to begin searching.  This is well after the item that matches so the routine returns zero indicating no match was found.  The solution in this case is to initialize MATCH-START to zero.

Comment List
Anonymous
Related Discussions
Recommended