replicating cases to a dataset in memory

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

replicating cases to a dataset in memory

Art Kendall
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
Warnings
Dataset stretch has no data.
Execution of this command stops.

I 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
Reply | Threaded
Open this post in threaded view
|

Re: replicating cases to a dataset in memory

Spousta Jan
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

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
Warnings
Dataset stretch has no data.
Execution of this command stops.

I 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 Jste si jisti, že opravdu potřebujete vytisknout tuto zprávu a/nebo její přílohy? Myslete na přírodu.

 


This message and any attached files are confidential and intended solely for the addressee(s). Any publication, transmission or other use of the information by a person or entity other than the intended addressee is prohibited. If you receive this in error please contact the sender and delete the message as well as all attached documents. The sender does not accept liability for any errors or omissions as a result of the transmission.

 

P Are you sure that you really need a print version of this message and/or its attachments? Think about nature.

-.- --
Reply | Threaded
Open this post in threaded view
|

Re: replicating cases to a dataset in memory

Bruce Weaver
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


Art Kendall wrote
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

 

   
 
 
    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
      Warnings
        Dataset stretch has no data.
        Execution of this command stops.
       
     
      I 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
--
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/).