Outfile command in PASW18 for Mac that does not truncate variable names

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

Outfile command in PASW18 for Mac that does not truncate variable names

FRESCO, DAVID
Colleagues:

I am trying to write a program that will produce an outfile with the a subset of variables repositioned in a particular order.  I am running PASW18 on Max OS X 10.7.2.  I think I am using some arcane syntax that cannot handle the longer variable names that are available in contemporary versions of SPSS/PASW.  This OUTFILE command works, but it truncates long variable names.

I am aware of the Save as .. dialogue box option, but I have hundreds of variables to wade through and it's rather tedious and I am not sure how to re-order then from that dialogue box.  Here is the form of the OUTFILE command I am using.  Thanks in advance for any ideas on how to take a user specified list of variables to write them to a new .sav file.  Please cc my email address on any listserve replies.

Thanks.

EXPORT OUTFILE='/Users/dave/Desktop/Mechanism.sav'
  /KEEP=  var1 var2 var3 ...var999.


David Fresco
------
David M. Fresco, Ph.D.               [hidden email]
Department of Psychology        Voice:  (330) 672-4049
Kent State University                   Fax:    (330) 672-3786
226 Kent Hall Annex
P.O. Box 5190                               http://dept.kent.edu/psychology/
Kent, OH  44242-0001                http://www.personal.kent.edu/~dfresco/

ListOwner of Helplessness http://psych.upenn.edu/~fresco/helplessness.html
Listowner of Mindfulness http://listserv.kent.edu/archives/mindfulness.html

=====================
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: Outfile command in PASW18 for Mac that does not truncate variable names

Art Kendall
Are you trying to produce a portable data file rather than and SPSS System file?
You are using a .sav filetype which usually means an SPSS system file.
If you are not trying to produce a system file what type of file are you trying to produce.

I have not used EXPORT for many years so I am not sure of the limitations of a portable file..

However a work around might be
save OUTFILE='/Users/dave/Desktop/Mechanism.sav'
  /KEEP=  var1 var2 var3 ...var999.
if you want to retain all of the variables you might save some typing by using
something like
save OUTFILE='/Users/dave/Desktop/Mechanism.sav'
  /keep = ID age school readingscore1 to readingscore10 mathscore1 to mathscore5, all.

If you want to have an active file rather than a disk file try something like
match files file= * /keep = ID age school readingscore1 to readingscore10 mathscore1 to mathscore5, all.
data set name reordered.


Art Kendall
Social Research Consultants





On 10/14/2011 4:21 PM, FRESCO, DAVID wrote:
Colleagues:

I am trying to write a program that will produce an outfile with the a subset of variables repositioned in a particular order.  I am running PASW18 on Max OS X 10.7.2.  I think I am using some arcane syntax that cannot handle the longer variable names that are available in contemporary versions of SPSS/PASW.  This OUTFILE command works, but it truncates long variable names.

I am aware of the Save as .. dialogue box option, but I have hundreds of variables to wade through and it's rather tedious and I am not sure how to re-order then from that dialogue box.  Here is the form of the OUTFILE command I am using.  Thanks in advance for any ideas on how to take a user specified list of variables to write them to a new .sav file.  Please cc my email address on any listserve replies.

Thanks.

EXPORT OUTFILE='/Users/dave/Desktop/Mechanism.sav'
  /KEEP=  var1 var2 var3 ...var999.


David Fresco
------
David M. Fresco, Ph.D.               [hidden email]
Department of Psychology        Voice:  (330) 672-4049
Kent State University                   Fax:    (330) 672-3786
226 Kent Hall Annex
P.O. Box 5190                               http://dept.kent.edu/psychology/
Kent, OH  44242-0001                http://www.personal.kent.edu/~dfresco/

ListOwner of Helplessness http://psych.upenn.edu/~fresco/helplessness.html
Listowner of Mindfulness http://listserv.kent.edu/archives/mindfulness.html

=====================
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
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: Outfile command in PASW18 for Mac that does not truncate variable names

Bruce Weaver
Administrator
In reply to this post by FRESCO, DAVID
Here are a couple excerpts from the "fine manual" entry for EXPORT:

--- start of FM excerpts ---
Variable names that exceed eight bytes are converted to unique eight-byte names—for
example, mylongrootname1, mylongrootname2,and mylongrootname3 would be converted to
mylongro, mylong_2,and mylong_3, respectively.

In most cases, saving data in portable format is no longer necessary, since IBM(R) SPSS(R)
Statistics data files should be platform/operating system independent.
--- end of FM excerpts ---

This suggests you should try SAVE OUTFILE or XSAVE OUTFILE rather than EXPORT.  

Good luck.

p.s. - No cc to your e-mail because I'm replying via Nabble, where your e-mail is hidden.  


FRESCO, DAVID wrote
Colleagues:

I am trying to write a program that will produce an outfile with the a subset of variables repositioned in a particular order.  I am running PASW18 on Max OS X 10.7.2.  I think I am using some arcane syntax that cannot handle the longer variable names that are available in contemporary versions of SPSS/PASW.  This OUTFILE command works, but it truncates long variable names.

I am aware of the Save as .. dialogue box option, but I have hundreds of variables to wade through and it's rather tedious and I am not sure how to re-order then from that dialogue box.  Here is the form of the OUTFILE command I am using.  Thanks in advance for any ideas on how to take a user specified list of variables to write them to a new .sav file.  Please cc my email address on any listserve replies.

Thanks.

EXPORT OUTFILE='/Users/dave/Desktop/Mechanism.sav'
  /KEEP=  var1 var2 var3 ...var999.


David Fresco
------
David M. Fresco, Ph.D.               [hidden email]
Department of Psychology        Voice:  (330) 672-4049
Kent State University                   Fax:    (330) 672-3786
226 Kent Hall Annex
P.O. Box 5190                               http://dept.kent.edu/psychology/
Kent, OH  44242-0001                http://www.personal.kent.edu/~dfresco/

ListOwner of Helplessness http://psych.upenn.edu/~fresco/helplessness.html
Listowner of Mindfulness http://listserv.kent.edu/archives/mindfulness.html

=====================
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
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: Outfile command in PASW18 for Mac that does not truncate variable names

FRESCO, DAVID
In reply to this post by Art Kendall
Thanks to Art and a back channel respondent for suggesting the correct answer of SAVE instead of EXPORT.


On Oct 14, 2011, at 5:47 PM, Art Kendall wrote:

Are you trying to produce a portable data file rather than and SPSS System file?
You are using a .sav filetype which usually means an SPSS system file.
If you are not trying to produce a system file what type of file are you trying to produce.

I have not used EXPORT for many years so I am not sure of the limitations of a portable file..

However a work around might be
save OUTFILE='/Users/dave/Desktop/Mechanism.sav'
  /KEEP=  var1 var2 var3 ...var999.
if you want to retain all of the variables you might save some typing by using
something like
save OUTFILE='/Users/dave/Desktop/Mechanism.sav'
  /keep = ID age school readingscore1 to readingscore10 mathscore1 to mathscore5, all.

If you want to have an active file rather than a disk file try something like
match files file= * /keep = ID age school readingscore1 to readingscore10 mathscore1 to mathscore5, all.
data set name reordered.


Art Kendall
Social Research Consultants





On 10/14/2011 4:21 PM, FRESCO, DAVID wrote:
Colleagues:

I am trying to write a program that will produce an outfile with the a subset of variables repositioned in a particular order.  I am running PASW18 on Max OS X 10.7.2.  I think I am using some arcane syntax that cannot handle the longer variable names that are available in contemporary versions of SPSS/PASW.  This OUTFILE command works, but it truncates long variable names.

I am aware of the Save as .. dialogue box option, but I have hundreds of variables to wade through and it's rather tedious and I am not sure how to re-order then from that dialogue box.  Here is the form of the OUTFILE command I am using.  Thanks in advance for any ideas on how to take a user specified list of variables to write them to a new .sav file.  Please cc my email address on any listserve replies.

Thanks.

EXPORT OUTFILE='/Users/dave/Desktop/Mechanism.sav'
  /KEEP=  var1 var2 var3 ...var999.


David Fresco
------
David M. Fresco, Ph.D.               [hidden email]
Department of Psychology        Voice:  (330) 672-4049
Kent State University                   Fax:    (330) 672-3786
226 Kent Hall Annex
P.O. Box 5190                               http://dept.kent.edu/psychology/
Kent, OH  44242-0001                http://www.personal.kent.edu/~dfresco/

ListOwner of Helplessness http://psych.upenn.edu/~fresco/helplessness.html
Listowner of Mindfulness http://listserv.kent.edu/archives/mindfulness.html

=====================
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


------
David M. Fresco, Ph.D.               [hidden email]
Department of Psychology        Voice:  (330) 672-4049
Kent State University                   Fax:    (330) 672-3786
226 Kent Hall Annex             
P.O. Box 5190                               http://dept.kent.edu/psychology/
Kent, OH  44242-0001                http://www.personal.kent.edu/~dfresco/

ListOwner of Helplessness http://psych.upenn.edu/~fresco/helplessness.html
Listowner of Mindfulness http://listserv.kent.edu/archives/mindfulness.html