=========================================================================
Date: Fri, 28 Jul 2006 15:09:56 +0200
Reply-To: Georg.Maubach@dpwnbc.net
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Georg Maubach <Georg.Maubach@dpwnbc.net>
Subject: AW: Re: Variable length to maximum
In-Reply-To: A<9D4BEF69F83C9744AB34E5FE2F78F46D9AC0AB@matrix.mrxin.marketrx.com>
Content-Type: text/plain; charset="iso-8859-1"
Hi Manmit,
You could have a look a the web site of Raynald Levesque http://www.spsstools.net. There you can find a macro called "variable type.sps". It does what you want and will run on SPSS 11.0+.
Regards
Georg Maubach
Market Analyst
-----Ursprüngliche Nachricht-----
Von: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] Im Auftrag von Manmit Shrimali
Gesendet: Freitag, 28. Juli 2006 15:01
An: SPSSX-L@LISTSERV.UGA.EDU
Betreff: Re: Variable length to maximum
Sorry...i do not have v14. also I do not know python.
Anything in syntax?
-----Original Message-----
From: Michael Pearmain [mailto:Michael.Pearmain@tangozebra.com]
Sent: Friday, July 28, 2006 6:24 PM
To: Manmit Shrimali; SPSSX-L@LISTSERV.UGA.EDU
Subject: RE: Re: Variable length to maximum
If your running in V14,
A python script would do this easily by looking at the variable type
MIKE
-----Original Message-----
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Manmit Shrimali
Sent: 28 July 2006 13:35
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: Re: Variable length to maximum
Thanks staffan but the problem is that I need to do for all variables. I have 550 numeric variables and 39 string variables. Can I use something like all varnum and all var string etc..
Please help.
-----Original Message-----
From: Staffan Lindberg [mailto:staffan.lindberg@anastat.se]
Sent: Friday, July 28, 2006 5:59 PM
To: Manmit Shrimali; SPSSX-L@LISTSERV.UGA.EDU
Subject: SV: Variable length to maximum
You can do this with the FORMAT statement, i.e.
FORMAT VARNUM (F40.0).
FORMAT VARSTRING (A255).
best
Staffan Lindberg
National Institute of Public Health
Sweden
-----Ursprungligt meddelande-----
Från: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] För Manmit Shrimali
Skickat: den 28 juli 2006 14:21
Till: SPSSX-L@LISTSERV.UGA.EDU
Ämne: Variable length to maximum
This is rather very simple question. However, after lot of research I still could not find the answer. Can please anyone provide me syntax for setting the variable length to maximum i.e numeric to 40 and string to 255.
Right now I have to manually go in width column of variable view and set it to maximum. I have to set it to maximum as when I have wave 2 data to merge, the length should be the same.
Thanks in advance.
Manmit
________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.