Focal Point
[SOLVED] Append Ampersand to Set Variable?

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

May 24, 2013, 09:45 AM
ColdWhiteMilk
[SOLVED] Append Ampersand to Set Variable?
I have a set variable that I use in a report header. I need to make an update to the value in this variable based on a department name change. The new value includes an ampersand (&) value, which WebFOCUS seems to be reading as the beginning of a prompt instead of as just a text character.

Is it possible to update the variable below to include this text character? (I'm looking to change "Department ABCD" to "Department ABC&D")

  
SET ASNAMES = ON

-SET &HEAD1  ='"'|'Department ABCD'|'"';

TABLE FILE CAR
PRINT
COUNTRY

WHERE RECORDLIMIT EQ 100

HEADING
&HEAD1.EVAL

ON TABLE PCHOLD FORMAT EXL2K
END
-EXIT

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


Production - 7.6.4
Sandbox - 7.6.4
May 24, 2013, 11:52 AM
RSquared
try this instead
quote]SET ASNAMES = ON

-SET &HEAD1 ='"'|'Department'|' ABC'|'& '|'D'|'"';

TABLE FILE CAR
PRINT
COUNTRY

WHERE RECORDLIMIT EQ 100

HEADING
&HEAD1.EVAL

ON TABLE PCHOLD FORMAT EXL2K
END
-EXIT[/quote]


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
May 24, 2013, 02:05 PM
susannah
-SET &DEPT = 'DEPT ABC&|D' ;

-TYPE &DEPT




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
May 24, 2013, 02:50 PM
ColdWhiteMilk
Thank you. It appears to be working with RSquared's solution.


Production - 7.6.4
Sandbox - 7.6.4
May 24, 2013, 03:05 PM
RSquared
Please flag as Solved.

thank you


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit