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
November 01, 2010, 02:57 PM
dbeagan
-SET &STR = '''AA'' OR ''BB'' OR ''CC''';
-SET &ORSTR = STRREP(&STR.LENGTH,&STR,6,''' OR ''',3,''',''',&STR.LENGTH,'A&STR.LENGTH') ;
-TYPE ORSTR = &ORSTR
Also have to make special provision for single value without an OR. If &STR is all numeric strrep will give an error.
WebFOCUS 8.2.06
November 01, 2010, 03:15 PM
j.gross
Your fourth argument, &OR, references its value
"' OR '"
whose length is 6 (two quotes, 2 spaces, 2 letters),
not 4.
Either replace the six characters "' OR '" by the three characters "','" (and set the length arguments accordingly), as dbeagan
suggests, or use
-SET &STR2 = STRREP(&STR.LENGTH,&STR, 4,' OR ', 3,',', &STR.LENGTH,'A&STR.LENGTH') ;
to replace 4 by 1
This message has been edited. Last edited by: j.gross,
- Jack Gross WF through 8.1.05
November 01, 2010, 03:24 PM
serenekk
Thank you very much! got it!
on VMS: OpenVMS AXP V8.2 Prod and TestEnvironment Webfocus: WebFocus 7.6.1 Prod and TestEnvironment