I think I have tried virtually every variation I can think of to get
the "Dataset Close" to work and it doesn't. I am using version 19. get file='C:\pullfile.sav'. sort cases by state (A) recnumbr (A). save outfile='C:\pullfile.sav'. dataset name pullfile. dataset close pullfile. exe. But after this code runs and fails (dataset doesn't close), sometimes, but not always I can run the last two lines and it works, even though I get the following warning message: Warnings Unrecognized dataset name pullfile. Execution of this command stops. Any thoughts would be appreciated, thanks. ===================== 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 |
If it's the only open dataset, it remains
open but is now unnamed. The closest you can come to no open datasets is:
dataset close all. new file. This will result in an empty, unnamed dataset. Rick Oliver Senior Information Developer IBM Business Analytics (SPSS) E-mail: [hidden email] Phone: 312.893.4922 | T/L: 206-4922 From: Allen <[hidden email]> To: [hidden email] Date: 06/11/2012 10:21 AM Subject: Dataset Close Sent by: "SPSSX(r) Discussion" <[hidden email]> I think I have tried virtually every variation I can think of to get the "Dataset Close" to work and it doesn't. I am using version 19. get file='C:\pullfile.sav'. sort cases by state (A) recnumbr (A). save outfile='C:\pullfile.sav'. dataset name pullfile. dataset close pullfile. exe. But after this code runs and fails (dataset doesn't close), sometimes, but not always I can run the last two lines and it works, even though I get the following warning message: Warnings Unrecognized dataset name pullfile. Execution of this command stops. Any thoughts would be appreciated, thanks. ===================== 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 |
In reply to this post by israpound
Thanks for the response.
The file I am trying to close is not the only data file open, there is one other and I am simply trying to close the "Pullfile.sav" leaving the other file; the only active file open, can this be done? ===================== 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 |
Oops. My bad. You need to make one of the
other datasets active, and then close the other one.
dataset activate someotherdatasetname. dataset close theoneyouwanttoclose. /*that isn't the one you just activated. Rick Oliver Senior Information Developer IBM Business Analytics (SPSS) E-mail: [hidden email] Phone: 312.893.4922 | T/L: 206-4922 From: Rick Oliver/Chicago/IBM To: Allen <[hidden email]> Cc: [hidden email] Date: 06/11/2012 11:44 AM Subject: Re: Dataset Close If you have other datasets open, the syntax you provided should close the named one, but there is no need to name it if you're just going to close it immediately, as in your example. I think some additional context might be helpful. Rick Oliver Senior Information Developer IBM Business Analytics (SPSS) E-mail: [hidden email] Phone: 312.893.4922 | T/L: 206-4922 From: Allen <[hidden email]> To: [hidden email] Date: 06/11/2012 11:36 AM Subject: Re: Dataset Close Sent by: "SPSSX(r) Discussion" <[hidden email]> Thanks for the response. The file I am trying to close is not the only data file open, there is one other and I am simply trying to close the "Pullfile.sav" leaving the other file; the only active file open, can this be done? ===================== 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 |
In reply to this post by israpound
If you have other datasets open, the syntax
you provided should close the named one, but there is no need to name it
if you're just going to close it immediately, as in your example. I think
some additional context might be helpful.
Rick Oliver Senior Information Developer IBM Business Analytics (SPSS) E-mail: [hidden email] Phone: 312.893.4922 | T/L: 206-4922 From: Allen <[hidden email]> To: [hidden email] Date: 06/11/2012 11:36 AM Subject: Re: Dataset Close Sent by: "SPSSX(r) Discussion" <[hidden email]> Thanks for the response. The file I am trying to close is not the only data file open, there is one other and I am simply trying to close the "Pullfile.sav" leaving the other file; the only active file open, can this be done? ===================== 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 |
Free forum by Nabble | Edit this page |