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 (October 2002)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 7 Oct 2002 10:08:36 -0700
Reply-To:     "Parise, Carol A." <PariseC@sutterhealth.org>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         "Parise, Carol A." <PariseC@sutterhealth.org>
Subject:      splitting name field syntax
Content-Type: text/plain; charset=us-ascii

Hi all,

I'm using the following syntax to split up a variable called pt_nme into the variables lname and fname. the error i'm getting is: Incorrect variable name: either the name is more than 8 characters, or it is not defined by a previous command.

Since it's not more than 8 characters, is there another command that i'm missing that defines the pt_name variable that needs to go before all of this?

STRING lname(A10). STRING fname(A10). COMPUTE #I = INDEX(pt_name,','). COMPUTE lname=SUBSTR(pt_name,1,#I-1). COMPUTE fname=SUBSTR(pt_name,#i+1). EXECUTE.

Thanks much Carol Sacramento CA


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