| Date: | Sun, 4 Aug 2002 08:05:22 -0400 |
| Reply-To: | Art@DrKendall.org |
| Sender: | "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU> |
| From: | "Arthur J. Kendall" <Arthur.Kendall@VERIZON.NET> |
| Subject: | Re: formatting strings into numerics |
|
| Content-Type: | text/plain; charset=us-ascii |
try
compute id1 = number(substr(id,1,2),n2).
compute id2 = number(substr(id,4,4),n4).
compute id3 = number(substr(id,10,1),n1).
goalie wrote:
> Dear Group,
>
> I am trying to merge several files. To do this I need to format the
> widths of string variables so that they are all 255. I did the same to
> the numeric variables using Format all (F40.0).
>
> Also I am trying to turn string variables into numeric variables.
> I have string id variables of the form 12-3456-7 and I would like to
> turn them into three variables of '12''3456''7'.
>
> If you could also send your replies to goalie@interchange.ubc.ca it
> would be greatly appreciated.
>
> Thanks kindly,
> Liz
|