LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (March 2002)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 15 Mar 2002 19:59:54 -0500
Reply-To:     Raynald Levesque <rlevesque@videotron.ca>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Raynald Levesque <rlevesque@videotron.ca>
Subject:      Re: Can Raynald or anybody help ?
In-Reply-To:  <A144B3611B47D21193330008C7246B760117CEBE@FHIEXNT0>
Content-Type: text/plain; charset="iso-8859-1"

Hi

Note that LAB2 is defined as a string of length 17 (A17). After the Line COMPUTE LAB2=CONCAT(QUOT,kommun,QUOT). LAB2 will NOT contain the ending quote if the length of kommun exceed 15.

2 solutions are possible: 1) increase dimension of LAB2 to 60 (this is the max length of a label accepted by SPSS) 2) use COMPUTE LAB2=CONCAT(QUOT,SUBSTR(LTRIM(kommun),1,15),QUOT).

Let me know if this does not solve it.

Regards

Raynald Levesque rlevesque@videotron.ca Visit my SPSS Pages http://pages.infinit.net/rlevesqu/index.htm

-----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU]On Behalf Of Staffan Lindberg Sent: March 15, 2002 8:47 AM To: SPSSX-L@LISTSERV.UGA.EDU Subject: Can Raynald or anybody help ?

Hi !

I am applying Raynalds syntax "Apply lab1 as value label to var1 by syntax.sps" to two variables of mine, county code and county name. The syntax runs but the value labels only contain the first 9 characters of of the name. Checking the file "temp.sps" shows that the last apostroph for the labels are missing.

The output shows:

Warning # 208 on line 4551 in column 35. Text: Upplands >A text string is not correctly enclosed in quotation marks on the command >line. Literals may not be continued across command lines without the use >of the continuation symbol '+'.

My syntax (pinched from Raynald of course) is:

GET FILE='C:\SLASK\KOMMUNTOT1.SAV'. AGGREGATE /OUTFILE=* /BREAK=kkod /kommun = FIRST(kommun) . STRING QUOT(A1). COMPUTE QUOT="'". STRING LAB2 (A17). COMPUTE LAB2=CONCAT(QUOT,kommun,QUOT). WRITE OUTFILE 'C:\SLASK\TEMP.SPS' "ADD VALUE LABELS kkod " kkod " " lab2 ".". EXECUTE. GET FILE='c:\slask\kommuntot1.sav'. INCLUDE 'TEMP.SPS'.

I've compared this syntax with Raynalds numerous times but can't see any significant difference. Probably I can't see the wood because of too many trees. Can Raynald or anybody help ?

best

Staffan Lindberg National Institute of Public Health Sweden


Back to: Top of message | Previous page | Main SPSSX-L page