BY.EXP does not factor in. This is about BSELECT, regardless of BY.EXP use.
@SYSTEM.RETURN.CODE is not supposed to be the number of *records* selected. It is supposed to be the number of items in the select list. >From the UniData UniBasic Commands Reference (BASR.pdf), Appendix B: ECL @SYSTEM.RETURN.CODE Values The following table describes the possible @SYSTEM.RETURN.CODE values for various ECL commands. Command Success Return Value --------- ----------------------------------------- BSELECT The number of items in the select list. What I'm saying: Watch out! @SYSTEM.RETURN.CODE for BSELECT is not what the documentation says it is. Your list may not have the number of entries indicated. Your list may even be empty even though @SYSTEM.RETURN.CODE is greater than zero. IBM is reluctant to change this behavior for fear that some application somewhere may be relying on @SYSTEM.RETURN.CODE being incorrect. How an application can rely on something that is never always correct nor always incorrect is beyond me. > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Anthony Youngman > Sent: Tuesday, June 26, 2007 10:12 AM > To: u2-users@listserver.u2ug.org > Subject: RE: [U2] RE: [UD] BSELECT @SYSTEM.RETURN.CODE anomaly > > What are you trying to say here? You don't make sense (sorry). > > Not knowing UD, I have to be careful here, but if I'm > selecting BY.EXP a multi-value field, I would NOT expect the > number of records selected to be the same as the number of > items in the select list. > > I'm getting the impression that @SYSTEM.RETURN.CODE *IS* the > number of records selected. Thing is, you're asking it to > count records multiple times if the same record appears > multiple times in the select list. > > Let's say we have 10 records, half of them with two items in > an MV field, and the rest with just one. Am I correct in > thinking that, if you do a SELECT BY.EXP, the > @SYSTEM.RETURN.CODE is 10, the number of > *records* selected, while SYSTEM(11) is 15, the number of > *items* in the select list? > > Hope this clarifies things :-) > > Cheers, > Wol > > -----Original Message----- > From: Jerry Banker [mailto:[EMAIL PROTECTED] > Sent: 26 June 2007 14:24 > To: u2-users@listserver.u2ug.org > Subject: RE: [U2] RE: [UD] BSELECT @SYSTEM.RETURN.CODE anomaly > > > To David A. Green, who said, "SYSTEM(11) returns number of > items in the > active select list. I think we should leave the > @SYSTEM.RETURN.CODE as > the number of records > selected." > > @SYSTEM.RETURN.CODE is NOT the number of records selected. > That is the > problem. It is the number of records queried/polled, not the > number of > items returned in the select list. Those numbers will not be the same > for a multivalued attribute or if the attribute is null and UDT.OPTION > 59 is ON. > ------- > u2-users mailing list > u2-users@listserver.u2ug.org > To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/