I have a report that I formatted as XML to read into a javascript routine (EXTJS). The problem is my data has an ampersand in the name fields (J & R) which I would like to display as is. But XML treats an & as a special value. I need to replace that with & amp; . But STRREP isn't available in 5.2.3.
anyone have a routine that can do a string replacement? PThis message has been edited. Last edited by: Lloyd,
Lloyd Prendergast Michael Kors (USA), Inc. Phone: 201-453-5076 Fax: 646-354-4776 Lloyd.Prendergast@Michaelkors.com
WebFOCUS 523 WebFOCUS 7.6 WebFOCUS 7.7
Windows Server 2005 Windows Server 2008
Iseries V5R3M0 Iseries V5R5M0 Iseries V6R1M0
October 29, 2008, 04:57 PM
j.gross
I would use Maintain, which has functions for unequal-length string substitutions even in 5.x.
- Jack Gross WF through 8.1.05
October 30, 2008, 03:06 AM
<JG>
GETTOK using 1 and GETTOK using -1
DEFINE FILE CAR AC/A30=IF COUNTRY EQ 'ENGLAND' THEN EDIT(COUNTRY,'999 & 9999999999') ELSE COUNTRY; NEWAC/A66=IF AC CONTAINS '&' THEN GETTOK(AC, 30, 1, '&', 30, 'A30') || ' &|amp;' || GETTOK(AC, 30, -1, '&', 30, 'A30') ELSE AC;
END TABLE FILE CAR PRINT AC NEWAC END
October 31, 2008, 04:40 PM
Lloyd
Thanks JG, that worked remarkably well!!!
Lloyd Prendergast Michael Kors (USA), Inc. Phone: 201-453-5076 Fax: 646-354-4776 Lloyd.Prendergast@Michaelkors.com