Dear Friend
It's possible. Use the SUBSTR command for COMPUTE a
new variable.
Example: A variable AGESEX is "78male" if COMPUTE a new
variable COMPUTE AGE = SUBSTR(AGESEX,1,2) results in a
new variable AGE is "78".
STRING FIRST_THREE_NUMBERS (A8).
COMPUTE AGE = SUBSTR(ORIGINAL_VARIABLE,1,3) .
EXECUTE .
Carlos Renato
Statistician
Recife - PE - Brazil
[hidden email]
2006/8/18, [Ela Bonbevan] <
[hidden email]>:
>
> Hello all,
>
> I have a variable that contains codes from two different time frames and
> they differ in their structure. I would to split these two types of codes
> into two different variables. The first set of codes are numeric three
> digit eg 665 and the second set are combined alpha numeric (eg. 88A,
> 97Z). I have managed to use the convert option to pull out all of the
> three digit numeric variables and pull them into a new variable. Is there
> any way to pull out the alpha numeric variables and put them in a new
> variable?
>
> Many thanks for your help.
>
> Diane
> Toronto, Canada
>
--
Carlos Renato
[hidden email]