Re: START KEY EQUAL TO



Ah. You're right. The comparison I was talking about (which, ISTM, is what
the original poster was asking) was as if you had coded "START filnam KEY IS
EQUAL TO FIRST-HALF ... ".
In that case, the comparison would be for "ABCDE", and the remaining five
characters of PRIMARY-KEY would NOT matter, according to the various
standards.

-Chuck Stevens

<docdwarf@xxxxxxxxx> wrote in message news:d9s648$9gu$1@xxxxxxxxxxxxxxxxxxx
> In article <d9s568$22n1$1@xxxxxxxxxxxxxxxxxxxx>,
> Chuck Stevens <charles.stevens@xxxxxxxxxx> wrote:
> >
> ><docdwarf@xxxxxxxxx> wrote in message
news:d9s49n$mv6$1@xxxxxxxxxxxxxxxxxxx
> >
> >> ... then unless you have a record on the file with the key of 'ABCDE
'
> >> (five trailing spaces) my experience tells me that you will get a 23.
> >
> >That may be what actually does happen, but unless I misread the wording
in
> >the COBOL standards, I don't think that's supposed to be what happens.
> >
> >'74/'85 both say that if the operands are unequal size, comparison
proceeds
> >as though the longer one was truncated on the right such that its length
is
> >equal to that of the shorter (START general rule 4).
>
> The operand was equal to itsself, no? KEY = PRIMARY-KEY was what I coded.
>
> [snip]
>
> >Have I misread something? Have I missed something entirely?
>
> Perhaps I should have included a SELECT specifying KEY IS PRIMARY-KEY.
>
> DD
>


.