Hello I also tested, it is very strange :-( with Syntax #1 different output
* No1 *.
new file.
get file = "C:\Temp\PIRLS2016RecodedVars_CatVarStats.sav" / keep = varname minimum maximum.
list vars = all.
sort cases by Varname.
casestovars index = Varname.
list vars = all.
echo "Example #2".
new file.
get file = "C:\Temp\RecoderPlusSampleResults_CatVarStats.sav" / keep = varname minimum maximum.
list vars = all.
sort cases by Varname.
casestovars index = Varname.
list vars = all.
echo "Example #3".
dataset close all.
NEW FILE.
add files / file = "C:\Temp\PIRLS2016RecodedVars_CatVarStats.sav" / file = "C:\Temp\RecoderPlusSampleResults_CatVarStats.sav" / keep = varname minimum maximum.
list vars = all.
sort cases by Varname.
casestovars index = Varname.
list vars = all.
------------------------------
xiaoqin Oezener-Wan
------------------------------
Original Message:
Sent: Tue November 09, 2021 09:32 PM
From: Eugenio Gonzalez
Subject: casestovars usage
And here is the syntax embedded within the message.
* Encoding: windows-1252.
echo "Example #1".
new file.
get file = "C:\Temp\PIRLS2016RecodedVars_CatVarStats.sav"
/ keep = varname minimum maximum.
list vars = all.
sort cases by Varname.
casestovars index = Varname.
list vars = all.
echo "Example #2".
new file.
get file = "C:\Temp\RecoderPlusSampleResults_CatVarStats.sav"
/ keep = varname minimum maximum.
list vars = all.
sort cases by Varname.
casestovars index = Varname.
list vars = all.
echo "Example #3".
add files / file = "C:\Temp\PIRLS2016RecodedVars_CatVarStats.sav"
/ file = "C:\Temp\RecoderPlusSampleResults_CatVarStats.sav"
/ keep = varname minimum maximum.
list vars = all.
sort cases by Varname.
casestovars index = Varname.
list vars = all.
Original Message:
Sent: 11/9/2021 8:59:00 PM
From: Rick Marcantonio
Subject: RE: casestovars usage
Hi. I see two SAV files. I don't see any syntax files attached.
------------------------------
Rick Marcantonio
Quality Assurance
IBM
Original Message:
Sent: Tue November 09, 2021 05:28 PM
From: Eugenio Gonzalez
Subject: casestovars usage
Hi,
Hope to get help to see what I can't see...
I am running the attached syntax, which as far as I can tell looks the same, except for the name of the file read. But I get different results. Examples #2 and #3 are what I would expect, one record with the minimum and maximum for each variable in the original file. Example #1 is clearly different form #2 and #3.
Thank you!
E.
This e-mail and any files transmitted with it may contain privileged or confidential information. It is solely for use by the individual for whom it is intended, even if addressed incorrectly. If you received this e-mail in error, please notify the sender; do not disclose, copy, distribute, or take any action in reliance on the contents of this information; and delete it from your system. Any other use of this e-mail is prohibited.
Thank you for your compliance.
#SPSSStatistics