LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2010)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 14 Sep 2010 17:59:17 +0200
Reply-To:     John F Hall <johnfhall@orange.fr>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         John F Hall <johnfhall@orange.fr>
Subject:      Re: Splitting a string
Comments: To: Richard Ristow <wrristow@mindspring.com>
Content-Type: multipart/alternative;

Richard

I'll have to try it later on a copy of the file. I substituted the wrong bit in my amended syntax. Meanwhile the problem has been sorted. See my reply to Jon.

John ----- Original Message ----- From: Richard Ristow To: John F Hall ; SPSSX-L@LISTSERV.UGA.EDU Sent: Tuesday, September 14, 2010 5:49 PM Subject: Re: Splitting a string

At 03:55 AM 9/14/2010, John F Hall wrote:

Just tried Richard's original, but it generated an error.

COMPUTE #Buffer=LTRIM (Input). Error # 4285 in column 24. Text: Input Incorrect variable name: either the name is more than 64 characters, or it is not defined by a previous command.

Execution of this command stops.

Tried again with a couple of variations, but new variables contain only sysmis. Perhaps I should have said I'm reading from a *.sav file and the variable to split is called student.

That'll do it, all right. You'll see that, in my test data, I named the variable to split "Input", since you hadn't given another name. So,

Error # 4285 in column 24. Text: Input Incorrect variable name: ... it is not defined by a previous command.

Nope, in your code "Input" wasn't defined by a previous command, nor part of the input file. Try running my code (I recommend the corrected version), but replacing variable name "Input" by "student". String variable "#Buffer" should be at least as long as variable "student".


[text/html]


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