Focal Point
[SOLVED]embed & in a sort text string
December 04, 2015, 03:57 PM
Tomsweb [SOLVED]embed & in a sort text string
I want to embed an & character in a text string for display in a report heading. The actual heading is
"Quarterly Sales Report for A&A Auto Sales"
I've tried the code below but it falls short of my goal.
-SET &A1 = 'A';
-SET &A2 = '&';
-SET &A1A2 = &A1 | &A2 | &A1 ;
&A1A2.EVAL
Ideas anyone?
Thanks
This message has been edited. Last edited by: <Emily McAllister>, December 11, 2015 06:45 PM Tomsweb WebFOCUS 8.1.05M, 8.2.x APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports Apache Tomcat/8.0.36
December 04, 2015, 04:16 PM
Mike in DeLand There's an escape character you can use when you have to put an ampersand into a line like that. I forget what it is, maybe a backslash. Anyway, lookup "escape" or "amper" in the help. It's in there somewhere.
Webfocus 8 Windows, Linux
December 04, 2015, 04:47 PM
Tom Flynn Concat bar: "Quarterly Sales Report for A&|A Auto Sales"
Tom Flynn WebFOCUS 8.1.05 - PROD/QA DB2 - AS400 - Mainframe
December 04, 2015, 04:59 PM
Tomsweb quote:
"Quarterly Sales Report for A&|A Auto Sales"
Thanks Tony. Sometimes these little things are just out of reach, yet nearby.
Tomsweb WebFOCUS 8.1.05M, 8.2.x APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports Apache Tomcat/8.0.36
December 04, 2015, 05:26 PM
Tom Flynn Like a name, but, that's OK...
Tom Flynn WebFOCUS 8.1.05 - PROD/QA DB2 - AS400 - Mainframe
December 04, 2015, 07:08 PM
Tomsweb my apologies....
Tomsweb WebFOCUS 8.1.05M, 8.2.x APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports Apache Tomcat/8.0.36
December 07, 2015, 05:32 AM
j.gross quote:
Quarterly Sales Report for A&|A Auto Sales
In -SET you need the escape, since the left-hand side is an expression (and & variable references call for substitution).
In -DEFAULT it works without:
-DEFAULT &HDG='Quarterly Sales Report for A&A Auto Sales'
since the LHS of DEFAULT is just a constant.