I was trying to adapt a small demo on replicating
cases with integer weights to a dataset in memory rather than a
disk file. When I run the syntax below, I get
WarningsI must be missing something obvious. new file. data list list/x (f1) kount(f1). begin data 1 3 2 4 end data. dataset name short. execute. list. dataset declare stretch. dataset activate short. loop seq = 1 to kount. xsave outfile='c:\project\stretched.sav'. xsave outfile=stretch. end loop. execute. get file='c:\project\stretched.sav'. dataset name fromdisk. formats seq (f2). list. dataset activate stretch. formats seq (f2). list. Art Kendall Social Research Consultants ===================== 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 |
Art, it looks like the command xsave cannot work with memory files - the line
xsave outfile=stretch.
is not working. You can use it only for data files (xsave out="C:/something".)
Best,
Jan
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Art Kendall Sent: Friday, April 08, 2011 4:00 PM To: [hidden email] Subject: replicating cases to a dataset in memory WarningsI must be missing something obvious. new file. data list list/x (f1) kount(f1). begin data 1 3 2 4 end data. dataset name short. execute. list. dataset declare stretch. dataset activate short. loop seq = 1 to kount. xsave outfile='c:\project\stretched.sav'. xsave outfile=stretch. end loop. execute. get file='c:\project\stretched.sav'. dataset name fromdisk. formats seq (f2). list. dataset activate stretch. formats seq (f2). list. Art Kendall Social Research Consultants ===================== 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 _____________ Tato zpráva a všechny připojené soubory
jsou důvěrné a určené výlučně adresátovi(-ům). Jestliže nejste oprávněným adresátem, je zakázáno jakékoliv zveřejňování, zprostředkování nebo jiné použití těchto informací. Jestliže jste tento mail dostali neoprávněně, prosím, uvědomte odesilatele a smažte
zprávu i přiložené soubory. Odesilatel nezodpovídá za jakékoliv chyby nebo opomenutí způsobené tímto přenosem.
P
Are you sure that you really need a print version of this message and/or its attachments? Think about nature.
|
Administrator
|
In reply to this post by Art Kendall
Hi Art. I can't find it in the Help just now, but I think the problem is that the OUTFILE for XSAVE cannot be a dataset--it has to be a .SAV file written to disk. One puzzling thing is that you get no error or warning for your line "xsave outfile=stretch."
Question for SPSS: If XSAVE cannot write to a dataset, why is there no warning here? Cheers, Bruce
--
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/). |
Free forum by Nabble | Edit this page |