Date: Thu, 2 Feb 2006 11:26:26 -0600
Reply-To: "Oliver, Richard" <roliver@SPSS.COM>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: "Oliver, Richard" <roliver@SPSS.COM>
Subject: Re: escape character in spss syntax?
Content-Type: text/plain; charset="us-ascii"
If the string contains a single quote, enclose the entire string in double-quotes (and vice versa):
3 "don't know"
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Serge Beaulieu
Sent: Thursday, February 02, 2006 11:18 AM
Subject: escape character in spss syntax?
Hi Folks, new list suscriber here ...
I have a longitudinal dataset that I manage.
I wrote a routine that allows the user to export the data to a
tab-delimmited text file which I can open in spss.
In the same routine, I generate a syntax file that creates variable and
value labels for every field.
One problem I havwe is that when I generate the syntax file any " or ' marks
that exist in the database, when dumped to the syntax mess up the commands.
Add Value label gender 1 'male' 2 female 3 'don't know'.
That command fails to execute because of the ' buried in the don't know. IS
there some sort of escape character that I can use like a slash oe something
that would prevent spss from mucking up that command?