Merge problems

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

Merge problems

Kalaallit Nunaat
Hey all,

So I'm having some problems merging some files using the syntax and I'm not sure if it's the syntax code or not.

EXECUTE.
SAVE OUTFILE = '/Users/xxxxxx/Desktop/folder/subfolder/mergedfile.sav'.

MATCH FILES/FILE = '/Users/xxxxxx/Desktop/folder/subfolder/file1.sav'
/FILE = '/Users/xxxxxx/Desktop/folder/subfolder/file2.sav'
/ BY ID.
EXECUTE.
SAVE OUTFILE = '/Users/xxxxxx/Desktop/folder/subfolder/mergedfile.sav'

I end up with Note 5146 saying that there is no file to restore, and the merge doesn't occur. Any one with any ideas?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Merge problems

John F Hall
Shouldn't you have a drive in the file name and the slashes \ not /?  Eg:

'c:\Users\xxxxxx\Desktop\folder\subfolder\mergedfile.sav'.

John F Hall (Mr)
[retired academic survey researcher]

Email:    [hidden email]
Website: www.surveyresearch.weebly.com





-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Kalaallit Nunaat
Sent: 24 February 2013 16:25
To: [hidden email]
Subject: Merge problems

Hey all,

So I'm having some problems merging some files using the syntax and I'm not
sure if it's the syntax code or not.

EXECUTE.
SAVE OUTFILE = '/Users/xxxxxx/Desktop/folder/subfolder/mergedfile.sav'.

MATCH FILES/FILE = '/Users/xxxxxx/Desktop/folder/subfolder/file1.sav'
/FILE = '/Users/xxxxxx/Desktop/folder/subfolder/file2.sav'
/ BY ID.
EXECUTE.
SAVE OUTFILE = '/Users/xxxxxx/Desktop/folder/subfolder/mergedfile.sav'

I end up with Note 5146 saying that there is no file to restore, and the
merge doesn't occur. Any one with any ideas?

Thanks



--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/Merge-problems-tp5718225.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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

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

Re: Merge problems

Andy W
John,

There are several situations in which such path names would be valid. One is that the user has specified a particular directory (via the CD command), and those folders are children within that base directory. Another would be using the FILE HANDLE command. For example if Kalaallit specified;

FILE HANDLE Users /name = "c:\".

Both strings would lead to the same path. Also (I believe) it is immaterial on Windows whether one uses forward or backslashes. I mention this because using FILE HANDLES are IMO a good thing, and one programmers of SPSS should be aware of. It makes it much easier to share code and reproduce analysis.

To Kalaallit,

Can you be more specific about the error message, do the files merge successfully but the save fails? If the files don't merge successfully to begin with that is (obviously) the problem that needs to be remedied, but the error message you posted is insufficient to determine that.
Andy W
apwheele@gmail.com
http://andrewpwheeler.wordpress.com/
Reply | Threaded
Open this post in threaded view
|

Re: Merge problems

David Marso
Administrator
In reply to this post by Kalaallit Nunaat
I am pretty sure you are not providing complete info re error messages.  Typically such a warning would be preceded by something more diagnostically useful.

1. Have you verified both files actually exist and can be accessed using the exact file names you have used in the MATCH (say with GET FILE)?
2.  Are both files sorted on ID?
3. Are you sure?  Please convince?
4.  What is the actual complete error message?

Kalaallit Nunaat wrote
Hey all,

So I'm having some problems merging some files using the syntax and I'm not sure if it's the syntax code or not.

EXECUTE.
SAVE OUTFILE = '/Users/xxxxxx/Desktop/folder/subfolder/mergedfile.sav'.

MATCH FILES/FILE = '/Users/xxxxxx/Desktop/folder/subfolder/file1.sav'
/FILE = '/Users/xxxxxx/Desktop/folder/subfolder/file2.sav'
/ BY ID.
EXECUTE.
SAVE OUTFILE = '/Users/xxxxxx/Desktop/folder/subfolder/mergedfile.sav'

I end up with Note 5146 saying that there is no file to restore, and the merge doesn't occur. Any one with any ideas?

Thanks
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Merge problems

Albert-Jan Roskam
In reply to this post by Andy W
> John,

>
> There are several situations in which such path names would be valid. One is
> that the user has specified a particular directory (via the CD command), and
> those folders are children within that base directory. Another would be
> using the FILE HANDLE command. For example if Kalaallit specified;
>
> FILE HANDLE Users /name = "c:\".

Forward slashes won't work with the \\server part in UNC paths in windows.
But I think the OP is using a Mac.

> Both strings would lead to the same path. Also (I believe) it is immaterial
> on Windows whether one uses forward or backslashes. I mention this because
> using FILE HANDLES are IMO a good thing, and one programmers of SPSS should
> be aware of. It makes it much easier to share code and reproduce analysis.

File handles are under-used, but so convenient! Still not a good idea to use mapped drives (drive letters), not even in file handles.

> To Kalaallit,
>
> Can you be more specific about the error message, do the files merge
> successfully but the save fails? If the files don't merge successfully to
> begin with that is (obviously) the problem that needs to be remedied, but
> the error message you posted is insufficient to determine that.

Kalaallit, did you sort each file by ID?

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

Re: Merge problems

Kalaallit Nunaat
Hi all,

Ya sorry it was sorted by ID but I had an oversight where the columns were different (11 and 10). Thanks for the responses though.

When I did try the merge it gave me a repeat of one of the files under the merged name...although that varied I think dependant on which data set was in the active window

John: Normally I'd be with you (and this was my first problem with the merge) but on a mac there is no drive to establish, the slashes are opposite, and capitalization does matter. The easiest way if you do ever try to run it on a mac is to highlight the file, go to the Finder-->Services-->TextEdit-->New Window Containing Selection That'll give you the file path that you can then just copy and paste.

Kal
Reply | Threaded
Open this post in threaded view
|

Re: Merge problems

Rick Oliver-3
As noted previously:

FILE="/foldername/foldername/etc/filename.ext"

without a drive name should be valid on any operating system.

Rick Oliver
Senior Information Developer
IBM Business Analytics (SPSS)
E-mail: [hidden email]




From:        Kalaallit Nunaat <[hidden email]>
To:        [hidden email],
Date:        02/25/2013 05:21 PM
Subject:        Re: Merge problems
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Hi all,

Ya sorry it was sorted by ID but I had an oversight where the columns were
different (11 and 10). Thanks for the responses though.

When I did try the merge it gave me a repeat of one of the files under the
merged name...although that varied I think dependant on which data set was
in the active window

John: Normally I'd be with you (and this was my first problem with the
merge) but on a mac there is no drive to establish, the slashes are
opposite, and capitalization does matter. The easiest way if you do ever try
to run it on a mac is to highlight the file, go to the
Finder-->Services-->TextEdit-->New Window Containing Selection That'll give
you the file path that you can then just copy and paste.

Kal



--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/Merge-problems-tp5718225p5718245.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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


Reply | Threaded
Open this post in threaded view
|

Re: Merge problems

John F Hall

I stand corrected on slashes and drives.

 

FILE HANDLE

 

Wow!  Takes me back 41 years to the CDC at LSE (or rather ULCC) when everything was on 80-column cards, (yes actual cards until we got programs and data on to mag tapes).  In those days VARIABLE LIST, INPUT MEDIUM and INPUT FORMAT were all the rage as well, and the only way to get data into SPSS.  Every time we changed computers (ICL, DECs and Vax at PNL we had to learn yet another JCL (also on cards) until we got VDUs and SPSS-X (interactive) and even then Jim Ring had to write a user-friendly front end.  An intermediate experiment with PC+ was a complete disaster and we reverted to the mainframe SPSS-X, but at least we had a couple of line-printers and didn’t have to wait 24 hours for the courier delivery

 

What a difference the Windows version makes (and think of the trees saved).

 

 

John F Hall (Mr)

[retired academic survey researcher]

 

Email:     [hidden email]

Website: www.surveyresearch.weebly.com

 

 

 

John Hall.

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Rick Oliver
Sent: 26 February 2013 00:36
To: [hidden email]
Subject: Re: Merge problems

 

As noted previously:

FILE="/foldername/foldername/etc/filename.ext"

without a drive name should be valid on any operating system.

Rick Oliver
Senior Information Developer
IBM Business Analytics (SPSS)
E-mail: [hidden email]




From:        Kalaallit Nunaat <[hidden email]>
To:        [hidden email],
Date:        02/25/2013 05:21 PM
Subject:        Re: Merge problems
Sent by:        "SPSSX(r) Discussion" <[hidden email]>





Hi all,

Ya sorry it was sorted by ID but I had an oversight where the columns were
different (11 and 10). Thanks for the responses though.

When I did try the merge it gave me a repeat of one of the files under the
merged name...although that varied I think dependant on which data set was
in the active window

John: Normally I'd be with you (and this was my first problem with the
merge) but on a mac there is no drive to establish, the slashes are
opposite, and capitalization does matter. The easiest way if you do ever try
to run it on a mac is to highlight the file, go to the
Finder-->Services-->TextEdit-->New Window Containing Selection That'll give
you the file path that you can then just copy and paste.

Kal



--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/Merge-problems-tp5718225p5718245.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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

Reply | Threaded
Open this post in threaded view
|

Re: Merge problems

Lemon, John S.

Talking of “Saved trees” can anyone remember the disastrous effect on the planet that the command “CROSSTABS ALL” could have – I remember seeing the courier deliver six – yes SIX – boxes of line printer paper which resulted from the card job and JCL which initiated an SPSS run with that in. The stack of paper was almost 5 feet high – and for days after we got double sided printing as it was re-used !!

 

Best Wishes

 

John S. Lemon

IT Services - Student Liaison Officer

University of Aberdeen

Edward Wright Building

Tel:  +44 1224 273350

 

IT news for Students

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of John F Hall
Sent: 26 February 2013 08:20
To: [hidden email]
Subject: Re: Merge problems

 

I stand corrected on slashes and drives.

 

FILE HANDLE

 

Wow!  Takes me back 41 years to the CDC at LSE (or rather ULCC) when everything was on 80-column cards, (yes actual cards until we got programs and data on to mag tapes).  In those days VARIABLE LIST, INPUT MEDIUM and INPUT FORMAT were all the rage as well, and the only way to get data into SPSS.  Every time we changed computers (ICL, DECs and Vax at PNL we had to learn yet another JCL (also on cards) until we got VDUs and SPSS-X (interactive) and even then Jim Ring had to write a user-friendly front end.  An intermediate experiment with PC+ was a complete disaster and we reverted to the mainframe SPSS-X, but at least we had a couple of line-printers and didn’t have to wait 24 hours for the courier delivery

 

What a difference the Windows version makes (and think of the trees saved).

 

 

John F Hall (Mr)

[retired academic survey researcher]

 

Email:     [hidden email]

Website: www.surveyresearch.weebly.com

 

 

 

John Hall.

 

From: SPSSX(r) Discussion [[hidden email]] On Behalf Of Rick Oliver
Sent: 26 February 2013 00:36
To: [hidden email]
Subject: Re: Merge problems

 

As noted previously:

FILE="/foldername/foldername/etc/filename.ext"

without a drive name should be valid on any operating system.

Rick Oliver
Senior Information Developer
IBM Business Analytics (SPSS)
E-mail: [hidden email]




From:        Kalaallit Nunaat <[hidden email]>
To:        [hidden email],
Date:        02/25/2013 05:21 PM
Subject:        Re: Merge problems
Sent by:        "SPSSX(r) Discussion" <[hidden email]>





Hi all,

Ya sorry it was sorted by ID but I had an oversight where the columns were
different (11 and 10). Thanks for the responses though.

When I did try the merge it gave me a repeat of one of the files under the
merged name...although that varied I think dependant on which data set was
in the active window

John: Normally I'd be with you (and this was my first problem with the
merge) but on a mac there is no drive to establish, the slashes are
opposite, and capitalization does matter. The easiest way if you do ever try
to run it on a mac is to highlight the file, go to the
Finder-->Services-->TextEdit-->New Window Containing Selection That'll give
you the file path that you can then just copy and paste.

Kal



--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/Merge-problems-tp5718225p5718245.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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





The University of Aberdeen is a charity registered in Scotland, No SC013683.
Reply | Threaded
Open this post in threaded view
|

Re: Merge problems

John F Hall

Should that be…?

 

CROSSTABS ALL BY ALL

 

Next worst was inexperienced (or incompetent) researchers who insisted on doing their own SPSS runs without first asking for advice.  As I say in my “Introduction to the use of computers in survey analysis” (http://www.weebly.com/uploads/2/9/9/8/2998485/1.1.3__introduction_to_the_use_of_computers_in_survey_analysis.pdf    2010, based on 1973 original, but still with 1973 SPSS output examples).


Finally, percentaging in tables may be needed not only in rows, but also in columns or even on the whole table.

 

Figure 10: Contingency table with all percentages

SEX SEX OF RESPONDENT by AGEGROUP GROUPED OF R AGEGROUP

 

[Table here in original 1973 SPSS output format]

 

[NB: Such tables may occasionally be needed for checking samples against known population parameters, but their extensive use in analysis is usually a sign of inexperience and anxiety in researchers who are either too proud to ask for advice and assistance or who are possibly even completely incompetent. It is also a waste of paper, time and money!]


At least it didn’t ask for:

 

/STATISTICS ALL

 

I must put my coat on get out more, but perhaps I should first update the SPSS output examples.

 

John F Hall (Mr)

[retired academic survey researcher]

 

Email:       [hidden email]

Website: www.surveyresearch.weebly.com

 

 

 

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Lemon, John
Sent: 26 February 2013 09:27
To: [hidden email]
Subject: Re: Merge problems

 

Talking of “Saved trees” can anyone remember the disastrous effect on the planet that the command “CROSSTABS ALL” could have – I remember seeing the courier deliver six – yes SIX – boxes of line printer paper which resulted from the card job and JCL which initiated an SPSS run with that in. The stack of paper was almost 5 feet high – and for days after we got double sided printing as it was re-used !!

 

From: SPSSX(r) Discussion [[hidden email]] On Behalf Of John F Hall
Sent: 26 February 2013 08:20
To: [hidden email]
Subject: Re: Merge problems

 

I stand corrected on slashes and drives.

 

FILE HANDLE

 

Wow!  Takes me back 41 years to the CDC at LSE (or rather ULCC) when everything was on 80-column cards, (yes actual cards until we got programs and data on to mag tapes).  In those days VARIABLE LIST, INPUT MEDIUM and INPUT FORMAT were all the rage as well, and the only way to get data into SPSS.  Every time we changed computers (ICL, DECs and Vax at PNL we had to learn yet another JCL (also on cards) until we got VDUs and SPSS-X (interactive) and even then Jim Ring had to write a user-friendly front end.  An intermediate experiment with PC+ was a complete disaster and we reverted to the mainframe SPSS-X, but at least we had a couple of line-printers and didn’t have to wait 24 hours for the courier delivery

 

What a difference the Windows version makes (and think of the trees saved).

 

 

John F Hall (Mr)

[retired academic survey researcher]

 

Email:     [hidden email]

Website: www.surveyresearch.weebly.com

 

 

 

John Hall.

 

From: SPSSX(r) Discussion [[hidden email]] On Behalf Of Rick Oliver
Sent: 26 February 2013 00:36
To: [hidden email]
Subject: Re: Merge problems

 

As noted previously:

FILE="/foldername/foldername/etc/filename.ext"

without a drive name should be valid on any operating system.

Rick Oliver
Senior Information Developer
IBM Business Analytics (SPSS)
E-mail: [hidden email]




From:        Kalaallit Nunaat <[hidden email]>
To:        [hidden email],
Date:        02/25/2013 05:21 PM
Subject:        Re: Merge problems
Sent by:        "SPSSX(r) Discussion" <[hidden email]>





Hi all,

Ya sorry it was sorted by ID but I had an oversight where the columns were
different (11 and 10). Thanks for the responses though.

When I did try the merge it gave me a repeat of one of the files under the
merged name...although that varied I think dependant on which data set was
in the active window

John: Normally I'd be with you (and this was my first problem with the
merge) but on a mac there is no drive to establish, the slashes are
opposite, and capitalization does matter. The easiest way if you do ever try
to run it on a mac is to highlight the file, go to the
Finder-->Services-->TextEdit-->New Window Containing Selection That'll give
you the file path that you can then just copy and paste.

Kal



--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/Merge-problems-tp5718225p5718245.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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





The University of Aberdeen is a charity registered in Scotland, No SC013683.