Kevin,
Birgitta is correct, but our code has hundreds of examples of %Found doing this same type of thing just fine. For us, %Equal is usually used in a SETLL situation.
You really don't give enough information to draw exact conclusions. So I'm going to make assumptions, and show an example I think fits your issue.
Assuming your file IDCASE10 is keyed and there are 3 fields in the key. Attributes and names are unknown, and the record format is also unknown. The declare should look like this, and I'm stepping it up a bit with a key list for the chain that is a data structure modeled on the file key list. We as a rule code the record format as the I/O for single record format files, and the file name in the "test" for success. See what you think of this:
Dcl-f IDCASE10 keyed;
Dcl-ds CseKey LikeRec(IDCASEREC: *Key) inz;
// real record format unknown...
Clear CseKey;
IDWHSE = LdWhse;
IDCASN = WACASN;
// real key field names of record format unknown...
Chain(n) %Kds(CseKey) IDCASEREC;
1b If Not %Found(IDCASE10);
WSMSG = 'Pallet does not exist in IDCASE10';
Flg_Error = 'Y';
LV LeaveSr;
1e Endif;
All ambiguity removed, very clean, and things line up easily. There are other techniques you can use to tighten this up as well, we often use a data structure over the display that can move many fields into other data structures like the key data structure with the EVAL-CORR op-code, as long as names line up.
------------------------------
Mike Overlander
------------------------------