AW: syntax for changing width of variable

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

AW: syntax for changing width of variable

Mario Giesel
Hi, Christine,

does this help?

RENAME VAR (ID = ID_old).
STRING ID (A15).
COMPUTE ID = ID_old.

 
Good luck,
Mario


________________________________
Von: Christine <[hidden email]>
An: [hidden email]
Gesendet: Dienstag, den 20. Januar 2009, 08:08:11 Uhr
Betreff: syntax for changing width of variable

Hi there!
I'm using version 15 and am new to syntax. I am combining two large datasets
and need to change the width of a string variable (of all things). What
would the code be for doing this task?

It would be very cumbersome to go into the dataset and manually change it as
this is longitudinal data and I am trying to create a script that processes
this automatically. All my books assume I can just simply go in and manually
change it but this would not be ideal.

Dataset1: ID, variable Type string, width 8
Dataset2: ID, variable Type string, width 15

Basically all I need to do is change 15 to 8

Thanks in advance.
Christine

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (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
[hidden email] (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
Mario Giesel
Munich, Germany
Reply | Threaded
Open this post in threaded view
|

Re: AW: syntax for changing width of variable

Melissa Ives
Or just:

Formats ID(A8).

Melissa

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Mario Giesel
Sent: Tuesday, January 20, 2009 11:22 AM
To: [hidden email]
Subject: [SPSSX-L] AW: syntax for changing width of variable

Hi, Christine,

does this help?

RENAME VAR (ID = ID_old).
STRING ID (A15).
COMPUTE ID = ID_old.


Good luck,
Mario


________________________________
Von: Christine <[hidden email]>
An: [hidden email]
Gesendet: Dienstag, den 20. Januar 2009, 08:08:11 Uhr
Betreff: syntax for changing width of variable

Hi there!
I'm using version 15 and am new to syntax. I am combining two large datasets and need to change the width of a string variable (of all things). What would the code be for doing this task?

It would be very cumbersome to go into the dataset and manually change it as this is longitudinal data and I am trying to create a script that processes this automatically. All my books assume I can just simply go in and manually change it but this would not be ideal.

Dataset1: ID, variable Type string, width 8
Dataset2: ID, variable Type string, width 15

Basically all I need to do is change 15 to 8

Thanks in advance.
Christine

=====================
To manage your subscription to SPSSX-L, send a message to [hidden email] (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 [hidden email] (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

PRIVILEGED AND CONFIDENTIAL INFORMATION
This transmittal and any attachments may contain PRIVILEGED AND
CONFIDENTIAL information and is intended only for the use of the
addressee. If you are not the designated recipient, or an employee
or agent authorized to deliver such transmittals to the designated
recipient, you are hereby notified that any dissemination,
copying or publication of this transmittal is strictly prohibited. If
you have received this transmittal in error, please notify us
immediately by replying to the sender and delete this copy from your
system. You may also call us at (309) 827-6026 for assistance.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (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
Reply | Threaded
Open this post in threaded view
|

Re: AW: syntax for changing width of variable

Oliver, Richard
That won't work. Prior to release 16, you could not change the defined width of a string variable. (You had to create a new variable.) Starting with release 16, you can do so with the Alter Type command.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Melissa Ives
Sent: Tuesday, January 20, 2009 2:29 PM
To: [hidden email]
Subject: Re: AW: syntax for changing width of variable

Or just:

Formats ID(A8).

Melissa

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Mario Giesel
Sent: Tuesday, January 20, 2009 11:22 AM
To: [hidden email]
Subject: [SPSSX-L] AW: syntax for changing width of variable

Hi, Christine,

does this help?

RENAME VAR (ID = ID_old).
STRING ID (A15).
COMPUTE ID = ID_old.


Good luck,
Mario


________________________________
Von: Christine <[hidden email]>
An: [hidden email]
Gesendet: Dienstag, den 20. Januar 2009, 08:08:11 Uhr
Betreff: syntax for changing width of variable

Hi there!
I'm using version 15 and am new to syntax. I am combining two large datasets and need to change the width of a string variable (of all things). What would the code be for doing this task?

It would be very cumbersome to go into the dataset and manually change it as this is longitudinal data and I am trying to create a script that processes this automatically. All my books assume I can just simply go in and manually change it but this would not be ideal.

Dataset1: ID, variable Type string, width 8
Dataset2: ID, variable Type string, width 15

Basically all I need to do is change 15 to 8

Thanks in advance.
Christine

=====================
To manage your subscription to SPSSX-L, send a message to [hidden email] (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 [hidden email] (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

PRIVILEGED AND CONFIDENTIAL INFORMATION
This transmittal and any attachments may contain PRIVILEGED AND
CONFIDENTIAL information and is intended only for the use of the
addressee. If you are not the designated recipient, or an employee
or agent authorized to deliver such transmittals to the designated
recipient, you are hereby notified that any dissemination,
copying or publication of this transmittal is strictly prohibited. If
you have received this transmittal in error, please notify us
immediately by replying to the sender and delete this copy from your
system. You may also call us at (309) 827-6026 for assistance.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (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
[hidden email] (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