Date: Tue, 29 May 2001 21:58:09 -0300
Reply-To: Census - Data Analysis <census@DYNAMO.COM.AR>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Census - Data Analysis <census@DYNAMO.COM.AR>
Subject: Re: manipulating string variable
Content-Type: text/plain; charset="iso-8859-1"
Try this (your variable name is str):
STRING str1(A2).
COMPUTE str1 = SUBSTR(str,1,2).
EXECUTE.
Then select records using str1 as a filter.
Regards,
Maria del Rosario Bruera
Census
Data Analysis & Data Mining
Zapata 31 - Piso 12 "E"
Tel / Fax : (54 11) 47 76 63 95
Buenos Aires
Argentina
-----Mensaje original-----
De: Thompson Bill T Contr USAFSAM/FEC <Bill.Thompson@BROOKS.AF.MIL>
Grupos de noticias: bit.listserv.spssx-l
Para: SPSSX-L@LISTSERV.UGA.EDU <SPSSX-L@LISTSERV.UGA.EDU>
Fecha: Martes, 29 de Mayo de 2001 02:11 p.m.
Asunto: manipulating string variable
>I have a variable I need to analyze that has several codes (type=string).
>For example:
>
>C01A
>C02A
>C03A
>.
>.
>.
>.
>.
>11B1
>11B2
>11C1
>11C2
>.
>.
>.
>.
>
>Is there a way to select all the C0... strings or all the 11 strings so I
>can analyze them separately.
>
>Thanks in advance,
>
>BT
>
>Bill Thompson, Biostatistician
>Conceptual MindWorks, Inc and the
>Aeromedical Consult Service
>2507 Kennedy Circle
>Brooks AFB TX 78235-5117
>Voice: 210-536-6835 Fax: 210-536-2817
>DSN: 244-6835 244-2817