Re: [U2] How to use LOCATE in an I Descriptor

2007-08-14 Thread Louie Bergsagel
MATCHES works, unless you want a positional value returned. IF @RECORD MATCHES XYZ THEN 1 ELSE 0 or TRANS(PRODUCT.FILE,PRODUCT.NUMBER,DESC,X);IF @1 MATCHES 0X'Roadster'0X THEN FUN ELSE BORING -- Loue On 8/9/07, Doug Farmer [EMAIL PROTECTED] wrote: I have someone asking me how to use a LOCATE

RE: [U2] How to use LOCATE in an I Descriptor

2007-08-12 Thread Danny Ruckel
Sent: Friday, August 10, 2007 4:31 PM To: u2-users@listserver.u2ug.org Subject: RE: [U2] How to use LOCATE in an I Descriptor Since I like to avoid subroutines when I can, this is how I would do it (using Perry's sample data slightly modified): EVENTCODE P]B]F]B]R And EVENTSTATUS A-T]B-T]FP-T]K

RE: [U2] How to use LOCATE in an I Descriptor

2007-08-12 Thread hemiiim2k
:[EMAIL PROTECTED] On Behalf Of Mark Eastwood Sent: Thursday, August 09, 2007 3:18 PM To: u2-users@listserver.u2ug.org Subject: RE: [U2] How to use LOCATE in an I Descriptor My first thought would be to create an I-descriptor that calls a basic subroutine (SUBR) to do the LOCATE and return value

RE: [U2] How to use LOCATE in an I Descriptor

2007-08-10 Thread Boydell, Stuart
If you like gymnastics and particularly wish to avoid a subr, you can use the vector EQS function with INDEX to find stuff - it's fugly but works reasonably efficiently... 001 I 002 MV.ATTRIBUTE.TO.SEARCH;EQS(REUSE('SEARCH.STRING'),@1);IF SUM(@2) THEN @11,(INDEX(@2,1,1)+1)/2 ELSE 'NOT FOUND' 003

RE: [U2] How to use LOCATE in an I Descriptor

2007-08-10 Thread Doug Farmer
Thanks for the example, We will try it out -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Burwell, Ed Sent: Friday, August 10, 2007 9:15 AM To: u2-users@listserver.u2ug.org Subject: RE: [U2] How to use LOCATE in an I Descriptor I use this on UD

RE: [U2] How to use LOCATE in an I Descriptor

2007-08-10 Thread Burwell, Ed
Of Richard A. Wilson Sent: Friday, August 10, 2007 3:47 AM To: u2-users@listserver.u2ug.org Subject: Re: [U2] How to use LOCATE in an I Descriptor left over from old prime days. basically a global catalog so voc items dont have to exists in each account where the subr might be used. I beliee its

Re: [U2] How to use LOCATE in an I Descriptor

2007-08-10 Thread Richard A. Wilson
left over from old prime days. basically a global catalog so voc items dont have to exists in each account where the subr might be used. I beliee its still legit for UV but probably not UD,Pick,etc Rich Jeff Butera wrote:

RE: [U2] How to use LOCATE in an I Descriptor

2007-08-10 Thread John Jenkins
And don't forget SHM.TO.LOAD Regards JayJay -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Richard A. Wilson Sent: 10 August 2007 08:47 To: u2-users@listserver.u2ug.org Subject: Re: [U2] How to use LOCATE in an I Descriptor left over from old prime

RE: [U2] How to use LOCATE in an I Descriptor

2007-08-10 Thread rbl000
Since I like to avoid subroutines when I can, this is how I would do it (using Perry's sample data slightly modified): EVENTCODE P]B]F]B]R And EVENTSTATUS A-T]B-T]FP-T]K-P]A-P TRIM(IFS(EQS(EVENTCODE,REUSE('B')),EVENTSTATUS,REUSE('')),@VM) Which returns all values for EVENTCODE 'B', else

RE: [U2] How to use LOCATE in an I Descriptor

2007-08-09 Thread Mark Eastwood
My first thought would be to create an I-descriptor that calls a basic subroutine (SUBR) to do the LOCATE and return value. Mark -Original Message- Subject: [U2] How to use LOCATE in an I Descriptor I have someone asking me how to use a LOCATE statement in an I Descriptor. I have

Re: [U2] How to use LOCATE in an I Descriptor

2007-08-09 Thread Richard A. Wilson
I believe the option is to roll your own with a catalog subr SUBR('*YOUR.LOCATE.SUBR',VALUE,@RECORD,AM.POS,VM.POS,SVM.POS,LR.JUST) and then create your subr to handle the parameters passed. note: this can also come in handy since different flavors dictate starting vm pos etc. Rich Doug

RE: [U2] How to use LOCATE in an I Descriptor

2007-08-09 Thread Baakkonen, Rodney A (Rod) 46K
I think you can use INDEX or FIELD or EXTRACT. I don't know that I have ever seen LOCATE. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Doug Farmer Sent: Thursday, August 09, 2007 1:44 PM To: u2-users@listserver.u2ug.org Cc: Vicki Gabler Subject: [U2]

RE: [U2] How to use LOCATE in an I Descriptor

2007-08-09 Thread Marc Harbeson
Yea - but if ANYONE knows how to avoid the SUBR it would be Trey Miller... snicker -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Eastwood Sent: Thursday, August 09, 2007 3:18 PM To: u2-users@listserver.u2ug.org Subject: RE: [U2] How to use LOCATE

Re: [U2] How to use LOCATE in an I Descriptor

2007-08-09 Thread Jeff Schasny
Use the LOCATE function LOCATE (expression, dynamic.array [,field# [,value#]] ; variable [;seq] ) {THEN statements [ELSE statements] | ELSE statements} Doug Farmer wrote: I have someone asking me how to use a LOCATE statement in

RE: [U2] How to use LOCATE in an I Descriptor

2007-08-09 Thread Stevenson, Charles
There isn't a UV- or UD- or PI-supplied way. I wrote a utility function to do that years ago, but you have to account for the THEN vs. ELSE clause as well as returning the position number. I did that by returning a negative number on ELSE. Then the calling I-descriptor has to test for +/- act

RE: [U2] How to use LOCATE in an I Descriptor

2007-08-09 Thread Perry Taylor
Doug, I don't believe LOCATE is supported I-types. When I have had to do this I have had to do some hoop jumping to pull off similar functionality. For example we have a record with two multi-valued fields... EVENTCODE P]B]F]R]R And EVENTSTATUS A-T]B-T]FP-T]K-P]A-P Now suppose I want the

RE: [U2] How to use LOCATE in an I Descriptor

2007-08-09 Thread Dave Davis
: Thursday, August 09, 2007 3:50 PM To: u2-users@listserver.u2ug.org Cc: Vicki Gabler Subject: RE: [U2] How to use LOCATE in an I Descriptor I think you can use INDEX or FIELD or EXTRACT. I don't know that I have ever seen LOCATE. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

RE: [U2] How to use LOCATE in an I Descriptor

2007-08-09 Thread David Murray
Doug, The latest UniVerse U2 System Description Chapter 5 - page 5-29 lists all the UniBasic functions that can be used directly within an I-Type. LOCATE does not seem to be listed. You could create a small UniBasic using a LOCATE to simulate one within an I-Type. Cheers, David Murray .learn

RE: [U2] How to use LOCATE in an I Descriptor

2007-08-09 Thread Doug Farmer
Looks like she will use a subroutine after all. Thanks for all the feedback Doug -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Murray Sent: Thursday, August 09, 2007 3:50 PM To: u2-users@listserver.u2ug.org Subject: RE: [U2] How to use LOCATE

Re: [U2] How to use LOCATE in an I Descriptor

2007-08-09 Thread Jeff Butera
SUBR('*YOUR.LOCATE.SUBR',VALUE,@RECORD,AM.POS,VM.POS,SVM.POS,LR.JUST) Can I ask a naive question: When using SUBR what is the point of the preceding * before the subroutine? Jeff Butera, Ph.D. Administrative Systems Hampshire College [EMAIL PROTECTED] 413-559-5556 Daddy - did you lose your