Does the same thing happen when you use SELECT filename SAVING [UNIQUE] field NO.NULLS? I'm not on Unidata so I can't try it. Universe doesn't have the BSELECT command. @SYSTEM.RETURN.CODE only returns 0 on a select so we use @SELECTED which does return the full amount in the select list.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, June 25, 2007 4:20 PM To: u2-users@listserver.u2ug.org Subject: [U2] RE: [UD] BSELECT @SYSTEM.RETURN.CODE anomaly My apologies for the poor job I did posting this. I sent it before I had completed the subscribe procedures. I blame it on my vacation. :-) Because of my mistake, I didn't get the replies. I had to get them from the list archive. Here are my replies to the replies: To Dave Davis, who said, "If you were curious about the number of customers queried couldn't you just do a SELECT CUSTOMER first?" I agree. Or, if you had done a previous select to whittle down the list, you'd already know how many records would be queried for the BSELECT. 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. Try this and see if you feel the same way about @SYSTEM.RETURN.CODE: EXECUTE 'UDT.OPTIONS 59 ON' CMD1 = 'BSELECT CUSTOMER WITH @ID GE "200" TAPES_RENTED' CRT CMD1 EXECUTE CMD1 IF @SYSTEM.RETURN.CODE GT 0 THEN CMD2 = 'DELETE TAPES' CRT ; CRT CMD2 EXECUTE CMD2 END SYSTEM(11) is our workaround. But it is a pain because: A) It is non-standard, i.e. not necessary for other SELECTs. B) It is not what the documentation says. BASR.pdf states that @SYSTEM.RETURN.CODE will contain the number of items in the select list. C) If the program reports errors, it must first check @SYSTEM.RETURN.CODE, and if okay then check SYSTEM(11). > -----Original Message----- > From: Moderator [mailto:[EMAIL PROTECTED] > Sent: Friday, June 22, 2007 6:15 PM > To: u2-users@listserver.u2ug.org; Dean Armbruster - 0018 HQ > Subject: [UD] BSELECT @SYSTEM.RETURN.CODE anomaly > > REPOSTED FOR NON-MEMBER ADDRESS: <[EMAIL PROTECTED]> > > I'd looking for feedback on @SYSTEM.RETURN.CODE as returned > from BSELECT of a multivalue attribute. > > Run the following basic code in the UniData demo account: > > CMD = 'BSELECT CUSTOMER TAPES_RENTED' > CRT CMD > EXECUTE CMD > CRT '@SYSTEM.RETURN.CODE = ':@SYSTEM.RETURN.CODE CLEARSELECT > > When I run it, I get: > > BSELECT CUSTOMER TAPES_RENTED > > 36 records selected to list 0. > > @SYSTEM.RETURN.CODE = 29 > > > Note that 29 is the number of records in CUSTOMER; 36 is then > number of items in the returned active select list. > > > The questions: Is there any way a program could depend on > @SYSTEM.RETURN.CODE being incorrect some of the time? Would > anyone want @SYSTEM.RETURN.CODE to be the number records > polled and not number of items in the returned list, even if > the number of items returned is 0? > > > IBM case #423086*USA > > UniData 6.1.18 > HP-UX 11.11 > ECLTYPE P > UDT.OPTIONS 59 ON > > > Dean Armbruster > System Analyst > Wolseley North American Division * 12500 Jefferson Avenue * > Newport News > * VA * 23602-4314 > T: +1(757) 989-2839 * F: +1(757)989-2801 ------- 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/