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 (November 2007)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 5 Nov 2007 15:27:34 -0500
Reply-To:     Florio Arguillas <foa2@cornell.edu>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Florio Arguillas <foa2@cornell.edu>
Subject:      Re: Trouble with a simple, stupid probelm
Comments: To: Mark A Davenport MADAVENP <M_Davenport@uncg.edu>
In-Reply-To:  <OFC1286725.8EDBF80C-ON8525738A.006C689A-8525738A.006D52BB@
              uncg.edu>
Content-Type: text/plain; charset="us-ascii"; format=flowed

Mark,

here are two options.

Best regards,

Florio

DATA LIST FIXED /HEDLEV 1-6 (A) FICE 7-12 (A). BEGIN DATA. 000001 000002 000003 000004 000005 000006 000007 000008 END DATA.

STRING CONCAT1(A6). COMPUTE CONCAT1 = CONCAT(LTRIM(HEDLEV),LTRIM(FICE)).

STRING CONCAT2(A6). IF HEDLEV NE '' CONCAT2 = HEDLEV. IF FICE NE '' CONCAT2 = FICE.

EXECUTE.

At 02:54 PM 11/5/2007, Mark A Davenport MADAVENP wrote: >All, > >I have a 6 character string var (HEDLEV) with many missing values. I have >another 6 character string (FICE) which fills in most of the missing >val;ues in the first string. I want to concatenate the 2 such that: > >HEDLEV FICE CONCAT >000001 000001 >000002 000002 > 000003 000003 >000004 000004 >000005 000005 > 000006 000006 > 000007 000007 >000008 000008 > >etc. > >Please not that I did not do the obvious--turn them into numbers and >simply add across, because I need to keep the 6-character structure >(preceding zeros). > >This should be simple. What am I not remembering? > >Mark > >*************************************************************************************************************************************************************** >Mark A. Davenport Ph.D. >Senior Research Analyst >Office of Institutional Research >The University of North Carolina at Greensboro >336.256.0395 >M_Davenport@uncg.edu > >'An approximate answer to the right question is worth a good deal more >than an exact answer to an approximate question.' --a paraphrase of J. W. >Tukey (1962) > >===================== >To manage your subscription to SPSSX-L, send a message to >LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the >command. To leave the list, send the command >SIGNOFF SPSSX-L >For a list of commands to manage subscriptions, send the command >INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


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