Help.. Text strings

Adam Robertson aroberts@orange.usyd.edu.au
Mon, 3 Jun 2002 15:04:03 +1000


This is a multi-part message in MIME format.

------=_NextPart_000_0031_01C20B0F.E6C8A7C0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

I have a .qks file that I am tring to save some info out to a text file.

-----------
temp t_cmdstr char*500
temp t_str char*400
temp t_tempcover char*100  ; temporary file name

    let t_tempcover = getsystemval("PHTEMP") + "/tempcover.txt"
    let t_str = "echo ^ >> " + t_tempcover

    let t_cmdstr = substitute(t_str,  (assign_name of assign_details ) )
    run command t_cmdstr
------------

It works OK most of the time.
The problem is when the value of (assign_name of assign_details ) contains
an ampersand ("&")
then it fails.


How can I deal with the "&" in the data.

Thanks

Adam Robertson
Acting Database and Web Administrator
University of Sydney, Orange
Phone: 02 6360 5967   Fax: 02 6360 5590
mailto:aroberts@orange.usyd.edu.au


------=_NextPart_000_0031_01C20B0F.E6C8A7C0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">


<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D370585604-03062002><FONT face=3DArial size=3D2>I have =
a .qks file=20
that I am tring to save some info out to a text =
file.</FONT></SPAN></DIV>
<DIV><SPAN class=3D370585604-03062002><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D370585604-03062002><FONT face=3DArial=20
size=3D2>-----------</FONT></SPAN></DIV>
<DIV><SPAN class=3D370585604-03062002><FONT face=3DArial size=3D2>temp =
t_cmdstr=20
char*500<BR></FONT></SPAN><SPAN class=3D370585604-03062002><FONT =
face=3DArial=20
size=3D2>temp t_str char*400<BR>temp t_tempcover char*100&nbsp; ; =
temporary file=20
name<BR></DIV></FONT></SPAN>
<DIV><SPAN class=3D370585604-03062002><FONT face=3DArial =
size=3D2>&nbsp;&nbsp;&nbsp;=20
let t_tempcover =3D getsystemval("PHTEMP") +=20
"/tempcover.txt"<BR>&nbsp;&nbsp;&nbsp; let t_str =3D "echo ^ &gt;&gt; " =
+=20
t_tempcover<BR></FONT></SPAN></DIV>
<DIV><SPAN class=3D370585604-03062002><FONT face=3DArial =
size=3D2>&nbsp;&nbsp;&nbsp;=20
let t_cmdstr =3D substitute(t_str,&nbsp; (assign_name of assign_details =
)=20
)<BR>&nbsp;&nbsp;&nbsp; run command =
t_cmdstr<BR>------------</FONT></SPAN></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><SPAN class=3D370585604-03062002><FONT face=3DArial size=3D2>It =
works OK most of=20
the time.</FONT></SPAN></DIV>
<DIV><SPAN class=3D370585604-03062002><FONT face=3DArial size=3D2>The =
problem is when=20
the value of (assign_name of assign_details ) contains an ampersand=20
("&amp;")</FONT></SPAN></DIV>
<DIV><SPAN class=3D370585604-03062002><FONT face=3DArial size=3D2>then =
it=20
fails.</FONT></SPAN></DIV>
<DIV><SPAN class=3D370585604-03062002><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D370585604-03062002><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D370585604-03062002><FONT face=3DArial size=3D2>How =
can I deal with=20
the "&amp;" in the data.</FONT></SPAN></DIV>
<DIV><SPAN class=3D370585604-03062002><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D370585604-03062002><FONT face=3DArial=20
size=3D2>Thanks</FONT></SPAN></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Adam Robertson</FONT> <BR><FONT =
face=3DArial=20
size=3D2>Acting Database and Web Administrator<BR></FONT><FONT =
face=3DArial=20
size=3D2>University of Sydney, Orange</FONT> <BR><FONT face=3DArial =
size=3D2>Phone: 02=20
6360 5967&nbsp;&nbsp; Fax: 02 6360 5590</FONT> <BR><FONT face=3DArial =
size=3D2><A=20
href=3D"mailto:aroberts@orange.usyd.edu.au">mailto:aroberts@orange.usyd.e=
du.au</A></FONT>=20
</DIV>
<DIV>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0031_01C20B0F.E6C8A7C0--