Focal Point
[CLOSED] STRREP - Version 7.6.6 vs Version 8

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4767038376

December 06, 2014, 10:37 AM
Ramkumar - Webfous
[CLOSED] STRREP - Version 7.6.6 vs Version 8
The below piece of code works flawlessly in WebFOCUS 8, but not in 7.6.6 It is not accepting ' ' as the string to be replaced. How to solve this out in 7.6.6.

-SET &ECHO= ALL;

-SET &OLD_VARIABLE = '500-200-300-400';
-TYPE &OLD_VARIABLE
-SET &NEW_VARIABLE = STRREP (&OLD_VARIABLE.LENGTH, &OLD_VARIABLE, 1, '-', 1, ' ', &OLD_VARIABLE.LENGTH, 'A&OLD_VARIABLE.LENGTH');
-TYPE &NEW_VARIABLE

-EXIT

This message has been edited. Last edited by: <Kathryn Henning>,


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
December 07, 2014, 08:36 AM
Tony A
Use HEXBYT(32, 'A1') in place of the quoted space character.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
December 07, 2014, 03:32 PM
Waz
Tech support cases state to use a visible character after the space in the text.

e.g.
-SET &NEW_VARIABLE = STRREP (&OLD_VARIABLE.LENGTH, &OLD_VARIABLE, 1, '-', 1, ' X', &OLD_VARIABLE.LENGTH, 'A&OLD_VARIABLE.LENGTH');

The length of the string is still 1 so you only get the space.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!