It seems that if the inlength is less than the searchlength, the output is blank.
See code below. I was expecting the value of VAR2 to be āDā, just like the value of VAR1. But because the length of the data in VAR1 is less than the length of the string to be replaced, the output is blank.
I also found this problem with STRREP about two years ago and reported this to IBI in a case (80732511). After more than one year the only response on this case was just:
"Thank you for bringing this problem to our attention. We have reviewed it with our engineering staff and it has been determined that it will not be implemented in the WebFOCUS product. Therefore, we will close the case. If this decision substantially impacts your business, please discuss with your local account support team. Sincerely,"
And after a complaint of the closure of my case without resolving it: "The description of behavior at the beginning of the Using Functions Manual makes it pretty clear that errors introduced by incorrect parameter handling can produce problems and that the programmer is responsible for ensuring that the problems are dealt with."
After that experience with IBI I almost gave up and very rarely raise any Cases with them...
btw. In the docu of searchlength they state "Is the number of characters in the (shorter length) string to be replaced." - probably (shorter length) should be enough for us to know that the function returns an empty string once the searchstring is longer than the instring.
Cheers Linne
WebFOCUS 7.7.03
June 02, 2014, 10:21 AM
Francis Mariani
quote:
After that experience with IBI I almost gave up and very rarely raise any Cases with them...
Linne, that type of comment from Tech Support would make me open more cases, if only to annoy them...
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
June 02, 2014, 05:54 PM
Waz
I also had a bundle of cases closed.
I think they just wanted to clean out the lists of old or less important cases.