v17 write/ aggregate file problem

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

v17 write/ aggregate file problem

Stephen Tagg

 

I think I'm getting a problem with v17, running some long syntax files that  have worked with previous versions.

When creating a new file in WRITE and AGGREGATE (and maybe others); editing  the syntax and running again: if the file already exists v17 doesn't generate a warning or error but doesn't bother creating the file. I'm left with  the old version. Previously it would just overwrite with a new version.

Has anyone else seen this?

Is this a feature or a bug?

Can we have a syntax switch saying don't overwrite or not?

Or will I need to use a macro to test the file exists and delete it if it does before running write/aggregate?

 

 

Dr Stephen Tagg

Reader in Marketing

University of Strathclyde

 

Reply | Threaded
Open this post in threaded view
|

Re: v17 write/ aggregate file problem

Oliver, Richard

With few exceptions (SAVE TRANSLATE being the only one that comes immediately to mind), commands that specify existing file names silently overwrite the files when executed via command syntax – unless the file is already in use by some application, in which case you should either get a message that the file couldn’t be saved or that it was saved with a different name (with an integer appended to the name). The following syntax works as expected for me. (Note that WRITE does not finish writing and close the file until another command that reads the data is encountered.)

 

data list free /x y.

begin data

1 1 1 2 1 3 2 4 2 5 2 6

end data.

aggregate outfile='/temp/aggtest.sav'

  /break=x /meanx=mean(y).

write outfile='/temp/writetest.txt'

  /x y.

execute.

 

data list free /x y.

begin data

1 11 1 22 1 33 2 44 2 55 2 66

end data.

aggregate outfile='/temp/aggtest.sav'

  /break=x /meanx=mean(y).

write outfile='/temp/writetest.txt'

  /x y.

execute.

 


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Stephen Tagg
Sent: Friday, June 12, 2009 7:35 AM
To: [hidden email]
Subject: v17 write/ aggregate file problem

 

 

I think I'm getting a problem with v17, running some long syntax files that  have worked with previous versions.

When creating a new file in WRITE and AGGREGATE (and maybe others); editing  the syntax and running again: if the file already exists v17 doesn't generate a warning or error but doesn't bother creating the file. I'm left with  the old version. Previously it would just overwrite with a new version.

Has anyone else seen this?

Is this a feature or a bug?

Can we have a syntax switch saying don't overwrite or not?

Or will I need to use a macro to test the file exists and delete it if it does before running write/aggregate?

 

 

Dr Stephen Tagg

Reader in Marketing

University of Strathclyde

 

Reply | Threaded
Open this post in threaded view
|

Re: v17 write/ aggregate file problem

Stephen Tagg

Thanks for your help on this.

 

It was an interaction of how syntax running deals with files, and Windows’ Clunky briefcase folders. So rather than silently overwriting the file of the same name it was not overwriting and not telling me.

Other applications come up with the bizarre, inappropriate message saying “file xxx.xx is in use on another computer”; it looks as if SPSS just ignores the error message and ploughs ahead using the old version of the file!!

 

Dr Stephen K Tagg, Marketing, University of Strathclyde

 

From: Oliver, Richard [mailto:[hidden email]]
Sent: 12 June 2009 14:07
To: Stephen Tagg; [hidden email]
Subject: RE: v17 write/ aggregate file problem

 

With few exceptions (SAVE TRANSLATE being the only one that comes immediately to mind), commands that specify existing file names silently overwrite the files when executed via command syntax – unless the file is already in use by some application, in which case you should either get a message that the file couldn’t be saved or that it was saved with a different name (with an integer appended to the name). The following syntax works as expected for me. (Note that WRITE does not finish writing and close the file until another command that reads the data is encountered.)

 

data list free /x y.

begin data

1 1 1 2 1 3 2 4 2 5 2 6

end data.

aggregate outfile='/temp/aggtest.sav'

  /break=x /meanx=mean(y).

write outfile='/temp/writetest.txt'

  /x y.

execute.

 

data list free /x y.

begin data

1 11 1 22 1 33 2 44 2 55 2 66

end data.

aggregate outfile='/temp/aggtest.sav'

  /break=x /meanx=mean(y).

write outfile='/temp/writetest.txt'

  /x y.

execute.

 


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Stephen Tagg
Sent: Friday, June 12, 2009 7:35 AM
To: [hidden email]
Subject: v17 write/ aggregate file problem

 

 

I think I'm getting a problem with v17, running some long syntax files that  have worked with previous versions.

When creating a new file in WRITE and AGGREGATE (and maybe others); editing  the syntax and running again: if the file already exists v17 doesn't generate a warning or error but doesn't bother creating the file. I'm left with  the old version. Previously it would just overwrite with a new version.

Has anyone else seen this?

Is this a feature or a bug?

Can we have a syntax switch saying don't overwrite or not?

Or will I need to use a macro to test the file exists and delete it if it does before running write/aggregate?

 

 

Dr Stephen Tagg

Reader in Marketing

University of Strathclyde

 

Reply | Threaded
Open this post in threaded view
|

Re: v17 write/ aggregate file problem

Fry, Jonathan B.

When I Googled “Windows Briefcase Folder”, one hit was a bug report at microsoft.com in which it was reported, as a bug, that “Windows NT Briefcase Appears and Acts Like a Normal Folder.”

 

Jonathan Fry

SPSS Inc.

 


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Stephen Tagg
Sent: Wednesday, August 19, 2009 7:52 AM
To: [hidden email]
Subject: Re: v17 write/ aggregate file problem

 

Thanks for your help on this.

 

It was an interaction of how syntax running deals with files, and Windows’ Clunky briefcase folders. So rather than silently overwriting the file of the same name it was not overwriting and not telling me.

Other applications come up with the bizarre, inappropriate message saying “file xxx.xx is in use on another computer”; it looks as if SPSS just ignores the error message and ploughs ahead using the old version of the file!!

 

Dr Stephen K Tagg, Marketing, University of Strathclyde

 

From: Oliver, Richard [mailto:[hidden email]]
Sent: 12 June 2009 14:07
To: Stephen Tagg; [hidden email]
Subject: RE: v17 write/ aggregate file problem

 

With few exceptions (SAVE TRANSLATE being the only one that comes immediately to mind), commands that specify existing file names silently overwrite the files when executed via command syntax – unless the file is already in use by some application, in which case you should either get a message that the file couldn’t be saved or that it was saved with a different name (with an integer appended to the name). The following syntax works as expected for me. (Note that WRITE does not finish writing and close the file until another command that reads the data is encountered.)

 

data list free /x y.

begin data

1 1 1 2 1 3 2 4 2 5 2 6

end data.

aggregate outfile='/temp/aggtest.sav'

  /break=x /meanx=mean(y).

write outfile='/temp/writetest.txt'

  /x y.

execute.

 

data list free /x y.

begin data

1 11 1 22 1 33 2 44 2 55 2 66

end data.

aggregate outfile='/temp/aggtest.sav'

  /break=x /meanx=mean(y).

write outfile='/temp/writetest.txt'

  /x y.

execute.

 


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Stephen Tagg
Sent: Friday, June 12, 2009 7:35 AM
To: [hidden email]
Subject: v17 write/ aggregate file problem

 

 

I think I'm getting a problem with v17, running some long syntax files that  have worked with previous versions.

When creating a new file in WRITE and AGGREGATE (and maybe others); editing  the syntax and running again: if the file already exists v17 doesn't generate a warning or error but doesn't bother creating the file. I'm left with  the old version. Previously it would just overwrite with a new version.

Has anyone else seen this?

Is this a feature or a bug?

Can we have a syntax switch saying don't overwrite or not?

Or will I need to use a macro to test the file exists and delete it if it does before running write/aggregate?

 

 

Dr Stephen Tagg

Reader in Marketing

University of Strathclyde