LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 2011)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 16 Dec 2011 22:55:18 +0100
Reply-To:     Jara Kampmann <jarakampmann@gmx.de>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Jara Kampmann <jarakampmann@gmx.de>
Subject:      Re: Overwriting a dataset
Content-Type: multipart/alternative;

Art,

I would like to be able to perform via syntax: get file="....sav". /*get a file. flip. /*perform any change to the file. *"save file." */*save changes into the active data set, just as in GUI using the "disket"-Button.

The rest of my earlier posting was to explain why I would like to be able to do this despite the risks connected to it, but that is not important. So, for special occasions, I do want to overwrite my data via syntax.

----- Urspr√ľngliche Nachricht ----- Von: Art Kendall Gesendet: 16.12.11 22:25 Uhr An: SPSSX-L@LISTSERV.UGA.EDU Betreff: Re: Overwriting a dataset

I am not sure I understand what you would like to do.? Please give us more detail. Art Kendall Social Research Consultants On 12/16/2011 3:49 PM, Jara Kampmann wrote: I totally agree with all the warnings and the precautions one should take. Nevertheless, I am wondering whether there is a possibility to save changes into the active data set via syntax. My annoyance is: if I create an outfile with aggregate, get the file and perform some changes, I always have to create a new file (with new data set name) to be able to save the changes. Which causes additional work of rewriting when having syntax to be run on several data sets as well as the need for more storing capacity.

So does one of you know of any syntax snippet that would do the trick (if necessary)?

Jara

? ----- Urspr√ľngliche Nachricht ----- Von: Jon K Peck Gesendet: 16.12.11 21:13 Uhr An: SPSSX-L@LISTSERV.UGA.EDU Betreff: Re: Overwriting a dataset

Apropos of which, I would remind people that Statistics has a feature to set file permissions.

Using SAVE, you can include /PERMISSIONS=READONLY or you can use the PERMISSIONS command: PERMISSIONS FILE=filespec /PERMISSIONS READONLY.

If you are using C & DS (Collaboration and Deployment Services), if you save to the repository, previous generations of the file are preserved, so ? you can go ? back to earlier versions. ? That works for syntax and other file types, too. ? Preserving previous versions of your syntax file can be as important as preserving your data.

Jon Peck (no "h") aka Kim Senior Software Engineer, IBM peck@us.ibm.com new phone: 720-342-5621

From: ? ? ? ? Art Kendall Art@DrKendall.org To: ? ? ? ? SPSSX-L@listserv.uga.edu Date: ? ? ? ? 12/16/2011 01:01 PM Subject: ? ? ? ? Re: [SPSSX-L] Overwriting a dataset Sent by: ? ? ? ? "SPSSX(r) Discussion" SPSSX-L@listserv.uga.edu -----------------------------------------------------------------

I have seen things like this happen dozens of times over the years. ? Losing 3 hours is a pain. ? The worse situation I have seen was when someone wiped her data out with an "IF (something impossible);" in SAS. (SAS's version of SELECT IF). ? This was an hour after she shredded the paper copy of her questionnaires to protect privacy. ? Two years work gone.

In 1971 after a couple of weeks experience, I realized that computers do what they are told. Which is often not what you want them to do. Art Kendall Social Research Consultants

On 12/16/2011 2:06 PM, David Marso wrote: One should *NEVER* overwrite data unless one can recreate it from original sources or some well defined documented processing milestone. ? Sometimes accidents happen and it can be *VERY EXPENSIVE* to recreate a crucial data set. ? Once upon a time in a land far far away I was working on a project with 4 other consultants. ? We had one shared dataset which was built from several other files after sorts/merges/complex flag calculations etc... All in all it took about 3 hours to build the master file from source data using the complex data preparation syntax. ? It took about an HOUR to sort the damned thing (500K cases, 400+ variables .. back in mid 90's when EVERYTHING was *SLOOOWWW*). One afternoon I grabbed the data, ran a bit of code for the part I was working on and was QUITE distressed to find there were only 10000 cases in the file. ? Turns out that one of the team members had closed out of SPSS and clicked the F'ing button asking Save changes before closing.... Consequently 4 people were sitting on their a$$es for 3 hours while I rebuilt the file from source files. After that, EVERYTHING got locked down (set ALL file permissions to be READ only).

Art Kendall wrote

Dangerous!&nbsp; If you overwrite a dataset will you ? ? ? still be able to go back and do the process over in the way you ? ? ? want versus the way you said to do it? ? ? Art Kendall Social Research Consultants

? ? On 12/16/2011 11:38 AM, paulm wrote:

? ? ? Hi, ? I am somewhat new to SPSS and I am trying to resolve an issue that I have when I run my syntax on the SPSS Server vs. running the syntax locally. Basically I am retrieving a dataset, doing some manipulations and then saving the dataset (overwriting it). ? Here is the syntax I am using:

DEFINE !newdate (!positional = !TOKENS(1) / !positional = !TOKENS(1)) * RETRIEVE THE CURRENT DATASET. GET FILE=!QUOTE(!CONCAT('e:\se\',!1,'\',!2,'\Data\POST\post_data.sav')). DATASET NAME DataSet1 WINDOW=FRONT.

dataset activate dataset1. dataset copy dataset2. dataset close dataset1. compute mydate=!maxdate . execute.

*FILTER OUT THE LAST DATE IN THE DATASET. DATASET ACTIVATE DataSet2. FILTER OFF. USE ALL. SELECT IF (date &lt; mydate) . EXECUTE. save outfile=!QUOTE(!CONCAT('e:\se\',!league,'\',!venue,'\Data\POST\post_data.sav')) / compressed . !ENDDEFINE. !newdate level1 level2 ? .

When I run this locally the syntax works. ? However, when I run it on the SPSS Server I get the following error: "Due to contention for the specified file, the data has been saved to a file with a different name - e:\se\level1\level2\data\post\post_data_1.sav"

Can anyone tell me a more efficient way to accomplish this task.

-- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Overwriting-a-dataset-tp5080768p5080768.html Sent from the SPSSX Discussion mailing list archive at Nabble.com.

===================== To manage your subscription to SPSSX-L, send a message to LISTSERV@.UGA ? (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 LISTSERV@.UGA (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

-- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Overwriting-a-dataset-tp5080768p5081115.html Sent from the SPSSX Discussion mailing list archive at Nabble.com.

===================== To manage your subscription to SPSSX-L, send a message to LISTSERV@LISTSERV.UGA.EDU (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 LISTSERV@LISTSERV.UGA.EDU (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 LISTSERV@LISTSERV.UGA.EDU (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


[text/html]


Back to: Top of message | Previous page | Main SPSSX-L page