Ray, Thanks for the suggestion - but no luck.
Setting @SYSTEM.RETURN.CODE makes no difference. I checked again and @SELECTED does get set by the SELECTINDEX. I tried storing and resetting @SELECTED (which does seem to be writable), and again no difference. The only way around the problem seems to be creating a new file keyed on operator number - just so I can do a direct read instead of a SELECTINDEX. AdrianW -----Original Message----- From: Ray Wurlod [mailto:[EMAIL PROTECTED] Sent: Thursday, 10 June 2004 15:18 To: [EMAIL PROTECTED] Subject: Re: [U2] [UV] SELECTINDEX inside a user conversion subroutine iscorruptin g the record count I expect that @SELECTED and @SYSTEM.RETURN.CODE are affected in the caller (UV query engine) rather than in the called subroutine. @SYSTEM.RETURN.CODE is writable (despite documentation to the contrary). Why not try intercepting it on entry to your subroutine and resetting it before exit? ----- Original Message ----- From: [EMAIL PROTECTED] Date: Thu, 10 Jun 2004 09:49:20 +0800 To: [EMAIL PROTECTED] Subject: [U2] [UV] SELECTINDEX inside a user conversion subroutine iscorruptin g the record count > We have a user conversion code (named UOPNN) which we use in the conversion > field of dictionaries to convert an operator number into an operator name. > > Our "operators" (ie. users) control file is keyed on name with an AK on > number. The UOPNN routine uses SELECTINDEX on the operator file using the > number to obtain the name. > > The SELECTINDEX statement is selecting to list 8, therefore not affecting > the default list (0). > > If I list a file with the SAMPLE keyword, displaying a field which uses the > conversion code - then 10 records will be listed, BUT the final line > displayed is "Sample of 1 records listed." instead of "Sample of 10 records > listed." > > The number displayed (ie. 1) is dependant on the number of records that the > final SELECTINDEX returns, which, to me, indicates that SELECTINDEX is > overwriting some internal counter variable. > > I added a CRT of @SELECTED and @SYSTEM.RETURN.CODE to the conversion routine > and neither of these are altered by the SELECTINDEX. > > This looks like it may be a bug in Universe as I'm pretty sure we didn't > have this problem under PI/Open. > > Does anyone have any suggestions of a way around this problem? > > (We're on UV 10.0.19) > ---------------------------------- > Adrian Womack > RAC Group of WA > Perth WA > Australia Disclaimer. This e-mail is private and confidential. If you are not the intended recipient, please advise us by return e-mail immediately, and delete the e-mail and any attachments without using or disclosing the contents in any way. The views expressed in this e-mail are those of the author, and do not represent those of this company unless this is clearly indicated. You should scan this e-mail and any attachments for viruses. This company accepts no liability for any direct or indirect damage or loss resulting from the use of any attachments to this e-mail. ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/
