Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

"Error 5130 - File out of Order" Problem while matching files

1,751 views
Skip to first unread message

fabian

unread,
Jul 15, 2008, 4:58:35 PM7/15/08
to
Hi,

I'm getting an error that I can not explain, since I ran the same
procedure (MATCH FILES, adding a variable) with two other, identically
structured data sets and it worked just fine.

Basically, I'm getting the 5130 Error that accuses me of not sorting
the files properly before trying to match them. Below is the output:

>File #1
> KEY:
> http://collection.cross-edu.ru:81/catalog/res/dbf58e98-a72c-7a92-09c9-094cbaa0aeae/? >'
> +'4 класс

>Error # 5130
>File out of order. All the files in MATCH FILES must be in non-descending
>order on the BY variables. Use SORT CASES to sort the file.
>This command not executed.

here is the syntax that produces this:

MATCH FILES
/FILE=*
/TABLE='DataSet8'
/RENAME (date_min HFK numericURL = d0 d1 d2)
/BY Url Tagsmerged
/DROP= d0 d1 d2.
EXECUTE.

"Tagsmerged" and "Url" are my Key Variables, DataSet8 is used as the
keyed table.
The thing is that I did sort both of them in ascending order. First I
sorted "Tagsmerged", then "Url".
That cannot be the reason.
Could it have to do with the fact that both data sets contain cases
that the other one doesn't contain? Is it possible that the selected
data set can contain all the cases of (or more than) the keyed table,
but that this is not allowed the other way around?

Maybe the first part of the error message can shed more light on the
issue, but I don't know what it means. For explanation: the first line
contains a Url-Value, the second one a Tagsmerged-Value (my data set
is russian). I don't understand what the "File #1 Key:" in combination
with rest of the error message is trying to tell me, maybe that SPSS
stopped at this key. But why should it do that since this URL is not
the first one, but rather the 25th or so on the list (in the 1st file.
it is on a later position in the keyed table). Also, it is weird that
there are so many blanks and line breaks in this message part. Maybe
some character of the value causes the error?

I really don't know how to solve this as it worked perfectly with a
very similar data set.

Bruce Weaver

unread,
Jul 15, 2008, 5:52:49 PM7/15/08
to
On Jul 15, 4:58 pm, fabian <fab...@bosioinc.com> wrote:
> Hi,
>
> I'm getting an error that I can not explain, since I ran the same
> procedure (MATCH FILES, adding a variable) with two other, identically
> structured data sets and it worked just fine.
>
> Basically, I'm getting the 5130 Error that accuses me of not sorting
> the files properly before trying to match them. Below is the output:
>
> >File #1
> >     KEY:
> >http://collection.cross-edu.ru:81/catalog/res/dbf58e98-a72c-7a92-09c9...                          >'
> >                           +'4 ËÌÁÓÓ

> >Error # 5130
> >File out of order.  All the files in MATCH FILES must be in non-descending
> >order on the BY variables.  Use SORT CASES to sort the file.
> >This command not executed.
>
> here is the syntax that produces this:
>
> MATCH FILES
>   /FILE=*
>   /TABLE='DataSet8'
>   /RENAME (date_min HFK numericURL = d0 d1 d2)
>   /BY  Url Tagsmerged
>   /DROP= d0 d1 d2.
> EXECUTE.
>
> "Tagsmerged" and "Url" are my Key Variables, DataSet8 is used as the
> keyed table.
> The thing is that I did sort both of them in ascending order. First  I
> sorted "Tagsmerged", then "Url".
> That cannot be the reason.

On your /BY subcommand, you are matching by Url and Tagsmerged in
that order. Therefore, you need to sort cases in that same order.
I.e.,

sort cases by Url Tagsmerged.

> Could it have to do with the fact that both data sets contain cases
> that the other one doesn't contain? Is it possible that the selected
> data set can contain all the cases of (or more than) the keyed table,
> but that this is not allowed the other way around?
>
> Maybe the first part of the error message can shed more light on the
> issue, but I don't know what it means. For explanation: the first line
> contains a Url-Value, the second one a Tagsmerged-Value (my data set

The first line suggest first row (or case). Do you mean the first
column (or variable)?

> is russian). I don't understand what the "File #1 Key:" in combination
> with rest of the error message is trying to tell me, maybe that SPSS
> stopped at this key. But why should it do that since this URL is not
> the first one, but rather the 25th or so on the list (in the 1st file.
> it is on a later position in the keyed table). Also, it is weird that
> there are so many blanks and line breaks in this message part. Maybe
> some character of the value causes the error?
>
> I really don't know how to solve this as it worked perfectly with a
> very similar data set.

--
Bruce Weaver
bwe...@lakeheadu.ca
www.angelfire.com/wv/bwhomedir
"When all else fails, RTFM."

fabian

unread,
Jul 16, 2008, 7:38:03 PM7/16/08
to
Hi, thanks for the reply.

On Jul 15, 11:52 pm, Bruce Weaver <bwea...@lakeheadu.ca> wrote:

>
> On your /BY subcommand, you are matching by Url and Tagsmerged in
> that order. Therefore, you need to sort cases in that same order.
> I.e.,
>
> sort cases by Url Tagsmerged.

I did that, didn't work though, just gives me a different key at which
the procedure seems to stop (at least that's my interpretation)


> The first line suggest first row (or case). Do you mean the first
> column (or variable)?

I was referring to the first lines of the error message. In the data
set, there is a column/variable "URL" and one "Tagsmerged". What I
wanted to know is what "KEY: (first break var)+(second break var)" is
supposed to tell me.


I tried out some things and it seems like a special character caused
the whole thing to fail, because when I removed it, it worked. At
least at first it did. Strange thing is that the said character was
not part of the case that was listed in the error message. I found it
by chance...
Now I'm having the same problem again with another, very similar data
set. and this time I can't find the error source. Isn't SPSS 16
supposed to fully support all Unicode characters? and why does one
character in the middle of a value cause the whole SORT process to
fail? Or could there be another reason?

RichUlrich

unread,
Jul 16, 2008, 8:36:40 PM7/16/08
to
On Wed, 16 Jul 2008 16:38:03 -0700 (PDT), fabian <fab...@bosioinc.com>
wrote:

SPSS will detect an error, I think, if it reads IDs in line k which
should have come before the IDs in line (k-1). (k-1) would still
be in order; so far as line-by-line processing is concerned, the
error is in line k.

Years ago, I had some data with special characters, for which I
learned that SPSS used a different sorting sequence than what
I had achieved by sorting the data before reading with SPSS.
(I preferred to sort before, because the system-sort program was
noticably faster.)

For those data files, I had to be sure to do all my sorting in SPSS.

I don't think I ever had a problem where SPSS objected to the sort
order when I had sorted both files for me.

So - make sure that BOTH your files are freshly sorted, and
see if there you can produce an error-n-equence.
If you can do that, SPSS should be concerned.

--
Rich Ulrich

0 new messages